## EXAMPLES FOR WEEK 18

The following examples are related to the work covered in WEEK 18.

```                                     0
Place values are 16  = 1 decimal
1
16  = 16 decimal
2
16  = 16 x 16 = 256 decimal
3
16  = 16 x 16 x 16 = 4096 decimal
```
So AD13 = A x 4096 + D x 256 + 1 x 16 + 3 x 1

Remember that A = 10 decimal and D = 13 decimal, so final calculation is:-

10 x 4096 + 13 x 256 + 1 x 16 + 3 x 1 = 40960 + 3328 + 16 + 3 = 44,307

```                  4 bit binary values are A = 1010
D = 1101
1 = 0001
C = 1100
```

So binary value is 1010 1101 0001 1100

• (c) 0111011 BINARY to HEXADECIMAL.

Split binary value into 4 digit groups starting from the right hand side.

011 1011, now add any zeroes needed to make left group up to 4 digits

0011 1011, now convert each group to hexadecimal.

0011 = 3 and 1011 = B so hexadecimal value is 3B

• (d) 1001110 BINARY to DECIMAL.
```                                    0
Place values are 2  = 1 decimal
1
2  = 2    "
2
2  = 4    "
3
2  = 8    "
4
2  = 16   "
5
2  = 32   "
6
2  = 64   "
```
So decimal value is 1 x 64 + 0 x 32 + 0 x 16 + 1 x 8 + 1 x 4 + 1 x 2 + 1 x 1 which is
64 + 8 + 4 + 2 = 78 decimal