Homework 3 Solutions

 

2.8) a)� 01111111 = 127

������ b)� 10000000 = -128

������ c) 2n-1 - 1

������ d) -2n-1�

 

2.11) a) 01100110

�������� b) 01000000

�������� c) 00100001

�������� d) 10000000

�������� e) 01111111

 

2.13) a) 11111010

��������� b) 00011001

��������� c) 11111000

��������� d) 00000001

 

2.22)���� 0111111111111111 + 0000000000000010� = 1000000000000001

 

2.30)�� a) 01010111

���������� b) 100

���������� c) 10100000

���������� d) 00010100

���������� e) 0000

����������� f) 0000

 

2.36)� a) 11111011 , AND

��������� b) 01000100, OR

��������� c) 00000000, AND

��������� d) 11111111, OR

��������� e) Add the bit pattern to itself 5 times or shift left 5 times.

������������� Then AND the result with 10000000.

 

2.49)� a) x2939

��������� b) x6E36

��������� c) x46F4

��������� d) xF1A8

��������� e) The answers are wrong, overflow occurred in both additions.

 

2.50) a) x5468

�������� b) xBBFD

�������� c) xFFFF

�������� d) x32A3

 

 

2.51) a) x644B

�������� b) x4428E800

�������� c)� x48656C6C6F

 

2.53)

A

B

Q1

Q2

0

0

1

0

0

1

1

1

1

0

1

1

1

1

0

1

 

Q2 = A OR B