0% found this document useful (0 votes)
34 views5 pages

Chapter01 SM

This document contains examples and explanations of binary number representations and binary arithmetic. Some key points: 1) Common binary number representations are provided for decimal numbers from 0 to 255 in both binary and hexadecimal. Binary arithmetic examples show addition, subtraction, and conversions between decimal, binary, and hexadecimal. 2) Multi-digit binary numbers are broken down into place values to perform addition and subtraction. Numbers larger than the bit size cannot be represented. 3) Signed binary numbers use the most significant bit to indicate sign (0 for positive, 1 for negative) and a complemented binary representation of the magnitude. This allows for positive and negative numbers. 4) Binary arithmetic examples show addition, subtraction, overflow

Uploaded by

lee
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views5 pages

Chapter01 SM

This document contains examples and explanations of binary number representations and binary arithmetic. Some key points: 1) Common binary number representations are provided for decimal numbers from 0 to 255 in both binary and hexadecimal. Binary arithmetic examples show addition, subtraction, and conversions between decimal, binary, and hexadecimal. 2) Multi-digit binary numbers are broken down into place values to perform addition and subtraction. Numbers larger than the bit size cannot be represented. 3) Signed binary numbers use the most significant bit to indicate sign (0 for positive, 1 for negative) and a complemented binary representation of the magnitude. This allows for positive and negative numbers. 4) Binary arithmetic examples show addition, subtraction, overflow

Uploaded by

lee
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Chapter One Solutions

1. a. 11111 = 1 + 2 + 4 + 8 + 16 = 31
b. 1000000 = 64
c. 1001101101 = 1 + 4 + 8 + 32 + 64 + 512 = 621
d. 101111 = 1 + 2 + 4 + 8 + 32 = 47
e. 10101010 = 2 + 8 + 32 + 128 = 170
f. 000011110000 = 16 + 32 + 64 + 128 = 240
g. 110011001100 = 4 + 8 + 64 + 128 + 1024 + 2048 = 3276
h. 000000000000 = 0

2. a. 73 / 2 = 36 rem 1 1
36 / 2 = 18 rem 0 01
18 / 2 = 9 rem 0 001
9/2=4 rem 1 1001
4 = 100 000001001001
b. 127 128 > 127 > 64 1------
127 - 64 = 63 > 32 11-----
63 - 32 = 31 > 16 111----
31 - 16 = 15 > 8 1111---
15 - 8 = 7 = 111 000001111111
c. 402 / 2 = 201 rem 0 0
201 / 2 = 100 rem 1 10
100 / 2 = 50 rem 0 010
50 / 2 = 25 rem 0 0010
25 / 2 = 12 rem 1 10010
12 / 2 = 6 rem 0 010010
6/2=3 rem 0 0010010
3/2=1 rem 1 10010010
1/2=0 rem 1 110010010
9
d. 512 = 2 = 001000000000
e. 1000 / 2 = 500 rem 0 0
500 / 2 = 250 rem 0 00
250 / 2 = 125 rem 0 000
125 / 2 = 62 rem 1 1000
62 / 2 = 31 rem 0 01000
31 = 11111 001111101000
f. 17 = 10001 000000010001
g. 4200 > 212 = 4096 Thus, can't represent in 12 bits

PROPRIETARY MATERIAL. © 2008 The McGraw-Hill Companies, Inc. All rights reserved. No part of this Manual may be displayed, reproduced or
distributed in any form or by any means, without the prior written permission of the publisher, or used beyond the limited distribution to teachers and
educators permitted by McGraw-Hill for their individual course preparation. If you are a student using this Manual, you are using it without permission.
1
h. 1365 / 2 = 682 rem 1 1
682 / 2 = 341 rem 0 01
341 / 2 = 170 rem 1 101
170 / 2 = 85 rem 0 0101
85 / 2 = 42 rem 1 10101
42 / 2 = 21 rem 0 010101
21 / 2 = 10 rem 1 1010101
10 = 1010 10101010101

3. a. 1001 0110 1011


96B
b. 0010 1101 0000 0101
2D05
c. We can first convert to binary
791 / 2 = 395 rem 1 1
395 / 2 = 197 rem 1 11
197 / 2 = 98 rem 1 111
98 / 2 = 49 rem 0 0111
49 / 2 = 24 rem 1 10 111
24 / 2 = 12 rem 0 01 0111
12 = 1100 11 0001 0111
1/8=0 rem 1 1427
Adding leading 0's we get 0011 0001 0111 = 31716
d. We will convert to hex by dividing by 16
1600 / 16 = 100 rem 0 0
100 / 16 = 6 rem 4 40
6 / 16 = 0 rem 6 640

4. a. 1000 = 4 X 163 = 4096


b. ABCD = 13 + 12 X 16 + 11 X 162 + 10 X 164 =
= 13 + 192 + 5632 + 40960 = 46797
c. 3FF = 15 + 15 X 16 + 3 X 162 = 400 - 1 =
= 4 X 162 - 1 = 1024 - 1 = 1023

2
5. a. 00000 b. 11100
000011 3 010100 20
001100 12 101101 45
001111 15 000001 65 overflow
c. 11000 d. 11110
011100 28 110011 51
011010 26 001110 14
110110 54 000001 65 overflow
e. 01110 f. 00111
001011 11 000101 5
100111 39 000111 7
110010 50 001100
g. 01100
101100 44
100100 36
010000 80 overflow

6. a. +25 = 011001
b. 0 = 000000
c. +32 cannot be stored (It would need another bit.)
d. +15 = 001111
e. Complement +15 110000
Add 1 1
-15 = 110001
f. -45 cannot be stored
g. -1: +1 = 000001 111110
1
-1 = 111111
h. -16: +16 = 010000 101111
1
110000

7. a. 000101 = +5
b. 111111: negative 000000
1
magnitude: 000001
= -1
c. 010101 = + 21
d. 100100: negative 011011 + 1 = 011100
= -28
e. 011111 = + 31

3
f. 111001: negative 000110 + 1 = 000111
= -7
g. 101010: negative 010101 + 1 = 010110
= -22
h. 100000: negative 011111 + 1 = 100000
= -32

8. a. 1 + 2 + 8 + 32 + 64 = +107
b. negative: magnitude = 01010001 + 1 = 01010010
=> -82
c. 113 = 01110001
-113 = 10001110 + 1 = 10001111
d. cannot store numbers larger than +127
e. +43 = 00101011
f. -43 = 11010100 + 1 = 11010101

9. a. 11111 b. 00001
110101 -11 111010 -6
001111 +15 000111 +7
000100 +4 000001 +1
c. 11100 d. 01110
001100 +12 101010 -22
110100 -12 100110 -26
000000 0 010000 overflow
e. 11000 f. 10000
011010 +26 111101 -3
001100 +12 110000 -16
100110 overflow 101101 -19

10. (subtrahend shown bit-by-bit complemented)


i. unsigned ii. signed
a. 1
010101 21 +21
110011 - 12 - +12
(1) 001001 9 +9
b. 1
010001 17 +17
100111 - 24 - +24
(0) 111001 overflow -7
c. 1
111010 58 -6
111000 -7 --7
(1) 110011 51 -13

4
d. 1
100100 36 -28
100111 - 24 - +24
(1) 001100 12 overflow
e. 1
110010 50 -14
001000 - 55 - - 9
(0) 111011 overflow - 5
f. 1
111010 58 - 6
010010 - 45 - -19
(1) 001101 13 +13

11. a. i. 0001 0000 0011 b. i. 1001 1001 1001


ii. 0001 0000 0011 ii. 1100 1100 1100
iii. 0001 0000 0011 iii. 1111 1111 1111
iv. 0100 0011 0110 iv. 1100 1100 1100
v. 10100 11000 10001 v. 00011 00011 00011
c. i. 0000 0000 0001 d. i. 0000 0000 0000
ii. 0000 0000 0001 ii. 0000 0000 0000
iii. 0000 0000 0001 iii. 0000 0000 0000
iv. 0011 0011 0100 iv. 0011 0011 0011
v. 11000 11000 10100 v. 11000 11000 11000

12. i. ii. iii. iv. v. vi.


a. no no no no 250 -6
b. no 18 15 no 27 + 27
c. 83 53 no 50 131 -125
d. 95 no no 62 149 -107
e. no no 87 no 237 - 19
f. 48 45 no 15 72 + 72

13. a. i. 1010000 1110010 1101111 1100010 1101100


1100101 1101101 0100000 0110101
ii. 0100010 1001111 1001011 0100010
iii. 0110010 0100000 0101011 0100000 0110010
0100000 0111110 0100000 0110011
iv. 1000001 1000010 1001101

b. i. Alan
ii. $7.95
iii. 9/3=3
iv. The end

You might also like