Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

CSC 1301 - Fall 17 Homework #3 Due 09/19/2017 Data Manipulation & Representation

ID: 3887136 • Letter: C

Question

CSC 1301 - Fall 17 Homework #3 Due 09/19/2017 Data Manipulation & Representation I. Complete the table below to show the smallest and largest values of 8-bit binary numbers using each of the four representations stated. 8 bits Smallest value Largest value Binary Decimal 127 Binary Decimal 1. Signed magnitude 2. One's complement 3. Two's complement 10000000-127 2. Represent -105 (negative 105) as an 8-bit binary number using: (a) Signed magnitude (b) One's complement (c) Two's complement (d) Excess 127 3. Perform the following subtractions using 8-bit two's complement binary arithmetic. Show you have checked your answers. (a) 75-30(b) 22-54 (c) -85 - 10 (d) -100-50 4. Assume that a machine uses 4 digits to store integers in binary form. Complete the following table. -6 -4

Explanation / Answer

Ans:

1)

Smallest number: -127   

Binary number:1111111110000001

1's Complement:1111110

2's Complement:1111111

Highest NUmber:127

Binary number:01111111

1's Complement:10000000

2's Complement:10000001

2)

Number:-105

Binary Number: 1111111110010111

1's Complement:1101000

2's Complement:1101001

excess 3 of 127:0000000010000010

3)

a) 75-30: 101101

b) 22-54 : 1111111111100000(-32)

c) -85-10: 1111111111100000(-95)

d) -100-50: 1111111111100000

4)

NUmber SignedBinary 2'scomplement

-8   1111111111111000 1000

-7   1111111111111001 111

-6   1111111111111010 110

-5 1111111111111011 101

-4 1111111111111100 011

-3 1111111111111101 011