# Spring 2003 ENGR 212 Homework 1

This homework is due 27 January, 4:30 PM.

## Problem 1

Convert the following numbers from decimal into binary and into hexadecimal numbers.

• 212
• 2003
• 48879
• 100

## Problem 2

Add the following three pairs of unsigned binary numbers.

• ```  1001100
+  11111
```
• ```      100
+  11110
```
• ```  1001100
+1001100
```

## Problem 3

Add the following three pairs of 8-bit twos-complement binary numbers. Indicate if the addition results in an overflow.

• ```  10011000
+11110001
```
• ```  01100110
+11001100
```
• ```  01100110
+01100110
```

## Problem 4

Add the following three pairs of 16-bit twos complement binary numbers. Indicate if the addition results in an overflow

The numbers are expressed in hexadecimal notation.

• ```   2003
+ 9999
```
• ```   BEEF
+ 1111
```
• ```   3AC0
+ 6165
```

## Problem 5

Perform the following additions using BCD arithmetic. Assume each 8-bit quantity is a packed-BCD number -- that is, that there are two decimal digits in each byte. Show where the intermediate result was modified because of carry or value greater than 9 to produce the correct final result.

• ```   18
+ 22
```
• ```   77
+ 14
```
• ```   06
+ 66
```

## Problem 6

Create a five-bit gray code sequence of 32 values.