Chapter 3 Information Representation
(a) A seven-bit cell. Figure 3.
Figure 3. (Continued) (b) Some possible values in a seven-bit cell.
Figure 3. (Continued) 6 8 7 2 5 J A N U A R Y (c) Some impossible values in a seven-bit cell.
Counting in decimal 7 4 2 28 35 8 5 22 29 36 2 9 6 23 3 37 3 7 24 3 38 4 8 25 32. 5 2 9 26 33. 6 3 2 27 34.
Counting in octal 7 6 25 34 43 7 26 35 44 2 2 27 36 45 3 2 2 3 37 46 4 3 22 3 4. 5 4 23 32 4. 6 5 24 33 42.
Counting in base 3 2 2 2 22 22 2 2 2 2 2 22 22 22 2 2 2 22 2. 2 2 222 2. 2 22 2.
Counting in binary...
Figure 3.2 (a) The place values for (bin). s place 2 s place 4 s place 8 s place 6 s place s place = 2 s place = 2 4 s place = 4 8 s place = 6 s place = 6 22 (dec) (b) Converting (bin) to decimal.
Figure 3.3 5 8 3 6 s place s place s place, s place, s place
Figure 3.4 2 4 2 2 2 2 2 (a) The binary number. 4 5 8 3 2 3 6 (b) The decimal number 58,36.
Figure 3.5 22 5 2 Remainders Dividends
Figure 3.6
Binary addition rules + = + = + = + =
Figure 3.7
Figure 3.8 Magnitude Sign bit
The NEG operation Taking the two s complement The NOT operation Change the s to s and the s to s
The two s complement rule The two s complement of a number is plus its one s complement NEG x = + NOT x
Figure 3.9 Decimal 7 6 5 4 3 2 Binary
Figure 3. Decimal Binary 8 7 6 2 5 3 4 4 3 5 2 6 7
Figure 3. s place 4 s place 32 s place
Figure 3.2 2 3 4 5 6 7
Figure 3.3 2 3 4 5 6 7 (a) Breaking the number line in the middle. 4 3 2 2 3 (b) Shifting the right part to the left side.
Figure 3.4 4 5 6 7 2 3 4 3 2 2 3
The status bits N = if the result is negative N = otherwise Z = if the result is all zeros Z = otherwise V = if a signed integer overflow occurred V = otherwise C = if an unsigned integer overflow occurred C = otherwise
p AND q p q p OR q p q Figure 3.5 p XOR q p q
Figure 3.6 p q p AND q p q p OR q true true true true true true true false false true false true false true false false true true false false false false false false p true true false false q true false true false p XOR q false true true false
Figure 3.7 Operation AND OR XOR NOT Implies Transfer Bit index Informal description Sequential separator Concurrent separator RTL Symbol < > { } ;,
RTL specification of OR operation c a b ;N c <, Z c =
Figure 3.8 Arithmetic shift left (ASL) C C r, r..4 r..5, r5 ; N r <, Z r =, V {overflow}
Figure 3.9 Arithmetic shift right (ASR) C RTL specification is a problem for the student
Figure 3.2 Rotate left (ROL) C ( a)
Figure 3.2 Rotate right (ROR) C ( b) The rotate right operation.
Counting in hexadecimal 7 E 5 C 23 8 F 6 D 24 2 9 7 E 25 3 A 8 F 26 4 B 2 9 2. 5 C 3 A 2. 6 D 4 B 22.
Figure 3.2 8 B E 7 7 7 s place 4 6 224 6 s place 256 2,86 256 s place 8 496 32,768 496 s place 35,85 (a) The place values for 8BE7. (b) Converting 8BE7 to decimal.
4 2 36 52 68 84 6 32 48 64 8 96 22 228 244 4 5 2 37 53 69 85 7 33 49 65 8 97 23 229 245 5 6 22 38 54 7 86 2 8 34 5 66 82 98 24 23 246 6 7 23 39 55 7 87 3 9 35 5 67 83 99 25 23 247 7 8 24 4 56 72 88 4 2 36 52 68 84 2 26 232 248 8 9 25 4 57 73 89 5 2 37 53 69 85 2 27 233 249 9 A 26 42 58 74 9 6 22 38 54 7 86 22 28 234 25 B 27 43 59 75 9 7 23 39 55 7 87 23 29 235 25 2_ 3_ 4_ 5_ 6_ 7_ 8_ 9_ A_ B_ C_ D_ E_ F_ C 2 28 44 6 76 92 8 24 4 56 72 88 24 22 236 252 D 3 29 45 6 77 93 9 25 4 57 73 89 25 22 237 253 E 4 3 46 62 78 94 26 42 58 74 9 26 222 238 254 F 5 3 47 63 79 95 27 43 59 75 9 27 223 239 255 7 33 49 65 8 97 3 29 45 6 77 93 29 225 24 2 8 34 5 66 82 98 4 3 46 62 78 94 2 226 242 2 3 9 35 5 67 83 99 5 3 47 63 79 95 2 227 243 3 6 32 48 64 8 96 2 28 44 6 76 92 28 224 24 Figure 3.2
Figure 3.22 Hexadecimal Binary 2 3 8 9 A B 4 5 6 7 C D E F
Char Bin Hex Char Bin Hex Char Bin Hex Char Bin Hex NUL SOH STX ETX 2 3 SP 2 2 22 23 4 4 42 43 6 6 62 63 EOT ENQ ACK BEL 4 5 6 7 24 25 26 27 44 45 46 47 64 65 66 67 BS HT LF VT 8 9 A B 28 29 2A 2B 48 49 4A 4B 68 69 6A 6B FF CR SO SI C D E F 2C 2D 2E 2F 4C 4D 4E 4F 6C 6D 6E 6F DLE DC DC2 DC3 2 3 3 3 32 33 5 5 52 53 7 7 72 73 DC4 NAK SYN ETB 4 5 6 7 34 35 36 37 54 55 56 57 74 75 76 77 CAN EM SUB ESC 8 9 A B 38 39 3A 3B 58 59 5A 5B 78 79 7A 7B FS GS RS US C D E F 3C 3D 3E 3F 5C 5D 5E 5F DEL 7C 7D 7E 7F
Figure 3.23 (Continued) Abbreviations for Control Characters NUL SOH STX ETX null, or all zeros start of heading start of text end of text FF CR SO SI form feed carriage return shift out shift in CAN EM SUB ESC cancel end of medium substitute escape EOT ENQ ACK BEL end of transmission enquiry acknowledge bell DLE DC DC2 DC3 data link escape device control device control 2 device control 3 FS GS RS US file separator group separator record separator unit separator BS HT LF VT backspace horizontal tabulation line feed vertical tabulation DC4 NAK SYN ETB device control 4 negative acknowledge synchronous idle end of transmission block SP DEL space delete
Figure 3.24 EBCDIC A B C 2 Binary
Figure 3.25. 8 s place 4 s place 2 s place s place 2 s place 4 s place 8 s place = 4 s place = 2 s place = s place = 2 s place = 4 s place =.25.25... 4. 5.375 (dec) (a) The place values for. (bin). (b) Converting. (bin) to decimal.
Figure 3.26 2 2 2 2 2 2 2 2 3 (a) The binary number.. 2 5 6 7 2 2 3 (b) The decimal number 56.72.
Figure 3.27.5859375 6.5859375 6 (dec) = (bin) (a) Convert the whole part.7875.34375.6875.375.75.5. (b) Convert the fractional part
Figure 3.28.2.4.8.6.2.4.8.6
Figure 3.29 Significand Exponent Sign
Figure 3.3 Two s Decimal Excess 3 Complement 4 3 2 2 3 4
Special value Zero Exponent field all s Significand all s There is a + and a
Figure 3.3 3..32825..32825 3. Negative overflow Negative normalized Negative underflow Zero Positive underflow Positive normalized Positive overflow
Infinity Special value Exponent field all s Significand all s There is a + and a Produced by operation that gives result in overflow region
Special value Not a Number (NaN) Exponent field all s Significand nonzero Produced by illegal math operations
Special value Denormalized number Exponent field all s Significand nonzero Hidden bit is assumed to be instead of If the exponent is stored in excess n for normalized numbers, it is stored in excess n for denormalized numbers
Figure 3.32 Scientific Binary notation Decimal Not a Number nonzero Negative infinity Negative. 2 3 5.5 normalized. 2 3 5........... 2.625. 2.. 2.96875.......... 2 2.265625. 2 2.25 Negative. 2 2.234375 denormalized. 2 2.2875.......... 2 2.325. 2 2.5625 Negative zero. Positive zero +.
Figure 3.32 (Continued). 2.5625 Negative zero. Positive zero +. Positive. 2 2.5625 denormalized. 2 2.325.......... 2 2.2875. 2 2.234375 Positive. 2 2.25 normalized. 2 2.265625.......... 2.96875. 2.. 2.625.......... 2 3 5.. 2 3 5.5 Positive infinity + Not a Number nonzero
Figure 3.33 Bits 8 23 (a) Single precision Bits 52 (b) Double precision
Figure 3.34 Reno Sacramento 4 6 4 San Francisco 5 Nevada 8 California 65 Las Vegas 7 55 7 Santa Barbara 4 6 Los Angeles 35 San Diego 45 3 Palm Springs
Figure 3.35 2 3 4 5 6 7 e3 35 45 4 55 65 8 7 35 e3 3 e3 e3 e3 e3 e3 2 45 3 e3 e3 e3 e3 e3 6 3 4 e3 e3 e3 7 e3 e3 e3 4 55 e3 e3 7 e3 4 6 e3 5 65 e3 e3 e3 4 e3 4 e3 6 8 e3 e3 e3 6 4 e3 5 7 7 e3 6 e3 e3 e3 5 e3 City Numbers Los Angeles San Diego 2 Palm Springs 3 Santa Barbara 4 San Francisco 5 Sacramento 6 Reno 7 Las Vegas
Route number 2 3 4 5 6 7 8 9 2 3 Cost 35 45 4 55 65 8 7 3 6 7 4 6 4 5 From 2 3 4 4 5 6 To 2 3 4 5 6 7 2 7 4 5 6 6 7 Figure 3.36