CO Assignment 1st
CO Assignment 1st
Assignment-I
1. The 2’s complement representation of -6 is 1010 in 4-bit register. What will be its 2’s complement
representation in 8-bit register?
2. What is the smallest negative integer represented in 8-bit register?
3. Convert decimal +49 and +29 to binary using 2’s complement representation and enough digits to
accommodate the numbers. Then perform the binary equivalent of
i. (+29) + (-49)
ii. (-29) + (+49)
iii. (-29) + (-49)
iv. (+29) – (+49)
v. (-29) – (+49)
vi. (+29) – (-49)
vii. (-29) – (-49)
4. Represent decimal number in “-13” in all three methods of negative binary number representation
using 8-bit register.
[HINT: Integer Representation: When an integer binary number is positive, the sign is represented by 0
and the magnitude by a positive binary number. When the number is negative, the sign is represented by 1
but the rest of the number may be represented in one of three possible ways:
i. Signed-magnitude representation
ii. Signed-1' s complement representation
iii. Signed 2' s complement representation
GLA University-Mathura
Department of Computer Engineering and Applications
Complements
1. 2’s Complement of a 2’s complement is .
2. Which number representation has two representation of “ 0 ” .
3. Obtain the 1’s and 2’s complement of the following:
i. 1000 0000
ii. 0101 0101
iii. 0000 0000
4. Find the 9’s and 10’s complement of the following:
i. 1234 5678
ii. 6332 5600
iii. 0000 0000
5. Find the 16’s complement of the “BABA”
6. Perform the following subtraction using 2’s complement method:
i. 01000 – 01001
ii. 100101- 010111
7. Perform the following subtraction using signed 10’s complement
i. 6428-3409
ii. 2043-6152
9. What is an overflow and underflow condition? Which Gate is used to verify the Overflow
condition?
GLA University-Mathura
Department of Computer Engineering and Applications
Assignment-IInd
1. Represent the number (+46.5), as a floating-point binary number with 24 bits. The normalized
fraction mantissa has 16 bits and the exponent has 8 bits.
Solution: [46.5 = 32+8+4+2+0.5 = (101110.1)2 ] = 0.1011101 x 26
3. What is the condition of overflow while adding two binary numbers? How this condition is
detected. Perform the arithmetic operation (+70) + (+80) and (-70) + (-80) with binary numbers
in signed 2’s complement representation and show how the condition of overflow occurred in
both the cases.
4. Represent the given number in IEEE standard 32 bit format, 1.00010100 X 2-10.
5. Represent -307.187510 in single and double precision formats
6. Show the value of all bits of a 12 bit register that hold the number equivalent to decimal 215 in:
i) Binary ii) Binary coded octal iii) Binary coded hexadecimal no. iv) BCD
7. Perform the subtraction with the following unsigned no. by taking 2’s complement for binary
and 10’s complement for decimal no. of the subtrahend.
i) 11010 – 10000 ii) 100 – 110000 iii) 1010100 – 1010100 iv) 1753 – 8640 v) 1200 – 250