# 09 - Hexadecimal

1. What is Hexadecimal?
`Note: You don't have to watch the video in order to answer the question. The video just provides a simple method for conversion to Hexadecimal`

A language that is comprised of hex (which means six in latin) symbols, 0 - 2 and A, B and C

A number system that has 'hexagonal' shaped symbols in it\

A number system comprised of 16 symbols: 0 - 9 and A - F

A mayan number system that is no longer in use today but has been referred to in star wars

2. Why is Hexadecimal useful?

For e.g. to represent 255 in binary you would need 8 bits 11111111 but in Hex that would take just two digits FF

It has a much shorter way of representing a byte of data (8 bits)

All of the above

It is more readable (to humans) than Binary

3. Using the table below, 3 in Decimal is what in Hexadecimal?
```Hexadecimal corresponding to Denary
====================================
Denary 0   1   2   3   4   5   6   7   8  9  10   11  12   13  14   15

Hex    0   1   2   3   4   5   6   7   8  9   A   B    C   D    E   F
```

3

4

2

1

4. Using this table, 'A' in Hexadecimal is what in Decimal?
```Hexadecimal corresponding to Denary
====================================
Denary 0   1   2   3   4   5   6   7   8  9  10   11  12   13  14   15

Hex    0   1   2   3   4   5   6   7   8  9   A   B    C   D    E   F
```

10

11

13

B

5. 16 in Hex is what in Decimal? Point out the error in the calculation below.
```Denary to Hexadecimal
====================================
#1 Step 1 - Take the Dec number and convert it into Binary

16 =

128  64  32  16   8  4  2  1
==============================
0    0   0   1    0  0  0  0

#2 Step 2 - Divide the bits into groups of four

0001     and  0000

#3 Convert each group of four back .....

8 4 2 1      8 4 2 1
-------      -------
0 0 0 1       0 0 0 0

= 1       and   0

=10

Therefore 16 in Decimal is 10 in Hexadecimal (1 and 0)```

16 in Hex is 21 in Decimal

There are no errors. 16 in Decimal is 10 in Hex

16 in Hex is 'G' in Decimal

16 in Hex cannot be represented in Decimal as the numbers stop at 15

6. 21 in Decimal is ……..? Is the calculation below correct?
```Convert a Decimal number into Hex
====================================
#1 Step 1 - Take the number and convert it into binary

21 =

128  64  32  16   8  4  2  1
==============================
0    0   0   1    0  1  0  1

#2 Step 2 - Divide the bits into groups of four

0001     and  0101

#3 Convert each group of four back...

8 4 2 1      8 4 2 1
-------      -------
0 0 0 1      0 1 0 0

= 1       and  4

=14

Therefore 21 in Decimal is 14 in Hex
```

It is correct. 21 in Decimal is 14 in Hex

The first group of four bits should have been 1000, so the final answer should have been 84 in Hex

The second group of four bits should have been 0101 which is 5, so 21 in Decimal is 15 in Hex

None of the above

7. 1A in Hex is 26 in Decimal - True or False?
```Convert a Hex number into Decimal
====================================
e.g. 1A

#1 Step 1 - Take the number and write each symbol as a binary number

#1           #A
8 4 2 1      8 4 2 1
-------      -------
0 0 0 1      1 0 1 0

#2 Step 2- Stick the two groups of binary bits together and convert to Decimal

128  64  32  16   8  4  2  1
=============================
0    0   0   1    1  0  1  0

=26
Therefore 1A in Hex, is 26 in Decimal.  ```

TRUE

FALSE

8. What is 1E (Hex) in Decimal?

20

40

30

50

9. What is 18 (in Hex) in Decimal?

24

23

34

12

10. 20 in Decimal is what in Hex?

17

16

15

14

11. What is E3 (in hex) as a Binary number?
`Note: This shows another method of conversion. You do not need to watch the video to answer the question.`

11100011

11100000

101

11101010

12. What is D1F (in hex) as a Binary number?

111111111

110100011111

23423434

110010

13. Hexadecimal numbers are often used to represent colours within HTML or CSS.

TRUE

FALSE

14. By changing the intensities of red, green and blue, we can create almost any colour. Fill in the blanks
`E.g. orange can be represented as #FFA500, which is (________ red, 165 green, 0 blue)`

333

256

255

32

15. A Media Access Control (MAC) address is a number which uniquely identifies a device on the internet. Is this Hex?
```e.g. D5-BE-E9-8D-44-9C

Expressing MAC addresses in hexadecimal format makes them easier to read and work with.```

FALSE

TRUE