5no_rpr_cdng_sys

5no_rpr_cdng_sys - Introduction to Computers and...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
Introduction to Computers and Programming Lecture 5 Numeric Values 25 10 using ASCII: 00110010 00110101 00000000 000011001 2 Prof. I. K. Lundqvist Reading: B pp. 47-71 Sept 12 2003 2 5 2 4 2 3 2 2 2 1 2 0 32 16 8 4 2 1 1 0 1 1 0 1 32 + 0 + 8 + 4 + 0 + 1 = 45 3 7 5 1 0 1 1 One Eight • Storing the value of • Binary notation: 1. Binary place 2. Position's quantity 3. Example binary pattern 4. Total (2. x 3.) Representation Position's quantity Representation Position's quantity Hundred Ten Four Two Base ten system Base two system
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Finding Binary Representation of Large Values 1. Divide the value by 2 and record the remainder 2. As long as the quotient obtained is not 0, continue to divide the newest quotient by 2 and record the remainder 3. Now that a quotient of 0 has been obtained, the binary representation of the original value consists of the remainders listed from right to left in the order they were recorded The Binary System 10 = 5x10 3 + 3x10 2 +8x10 1 +2x10 0 1011 2 = 1x2 3 + 0x2 2 + 1x2 1 + 1x2 0 = 8 + 0 + 2 + 1 = 11 10 Binary addition A byte 0 1 0 1 0 0 1 1 7 6 5 4 3 2 1 0 1 2 4 8 16 32 64 128 bit number bit value – 5382 2 1 0 R 1 2 3 1 R 1 2 6 0 R 0 2 13 6 R 1 1 1 0 1 • Decimal: Position represents a power of 10 • Binary: Position represents a power of 2
Background image of page 2
Representing Negative Numbers 2 = 19 10 . How to represent - 19 10 in binary? number (sign magnitude)
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 10

5no_rpr_cdng_sys - Introduction to Computers and...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online