# 2015F001/homework 3

### From CDS 130

Homework 3

# 1. Binary Division

Calculate 1101110_{2} divided 24_{10} (without using a calculator), and represent the result in binary.

**100.10 _{2}**

# 2. Binary Division

Calculate 1110110111_{2} divided by 256_{10} (without using a calculator), and represent the result in binary.

**11.10110111 _{2}**

# 3. Binary Division

Divide the following binary number using binary arithmetic

11101011 / 00011011

**1000.101101**

# 4. Sign-and-magnitude

Use the sign-and-magnitude method to represent the signed number (-21)_{10} in 8 bits.

**10010101**

# 5. One's complement

Convert One's Complement number 10001111 to base ten.

**(112) _{10}**

# 6. Two's complement

For the computer architecture using two's complement to represent negative numbers, what is the minimum number of bits needed to represent (-256)_{10}.

**9 bits**

# 7. Two's Complement

Form the negative equivalent of the following 8-bit Two's Complement numbers

- 00111101
- 00110110

**11000011**

**11001010**

# 8. Two's complement

In 2's complement, the 4-digit hexadecimal number 7010 is ( ? )_{10}.

# 9. Representing Negative Numbers

For an 8-bit group, work out the representation for − 37_{10} in

a) Sign & Magnitude b) One's Complement c) Two's Complement d) Excess-127

**(10100101)**

**(011010)**

**(100101)**

**(1011010)**

# 10. Representing Negative Numbers

For an 8-bit group, work out the representation for 39_{10} in

a) Sign & Magnitude b) One's Complement c) Two's Complement d) Excess-127

**100111**

**100111**

**100111**

**10100111**

# 11. Suppose signed integers are represented by 9 bits in a computer architecture. Show respectively the range of the integers (in base 10) in the following methods:

a) Sign & Magnitude b) One's Complement c) Two's Complement d) Excess-127

**255 to -255**

**255 to -255**

**255 to -255**

**127 to -127**

# 12. Two's complement for subtraction

Using 8-bit binary numbers as an example (e.g., 37 - 85 ), demonstrate how binary subtraction is carried out in two's complement.

**make one number its negative equivalent then add the negative number**