Hexadecimal numbers Flashcards

1
Q

How many different digits does hexadecimal use?

A

16

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does a single hex character represent?

A
  • can represent any denary number from 0-15

- to represent 0-15 in binary it would require a nibble so each hex character equates to a nibble in binary.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Why do programmers prefer hex when coding?

A
  • simpler to remember large numbers in hex, far shorter than binary numbers
  • due to them being shorter, less chance of input errors
  • easier to convert between denary and hex than binary and denary
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

In hex what do place values increase by?

A

Powers of 16

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How to convert from hex to denary?

A

multiply the numbers in each column then add them.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How to convert from denary to hex?

A

Divide the numbers in each column then divide the remainder in the next column then put them together.

e.g. 106:
106/16 = 6 r 10
10/1 = 10 = A
== 6A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What does hex go up in?

A

0-9 then A-F

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How can you convert from binary to hex?

A
  • using nibbles as each hex character is equal to 1 nibble
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Why is binary to hex conversions much easier than denary to hex?

A

You only have to deal with the nibbles one at a time.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

An example of splitting the binary number 10111001 to hexadecimal:

A

1) split into nibbles: 1011 and 1001
2) Draw a table with columns 1,2,4,8 then repeat for how many nibbles you require.
3) Fill in table with binary number
4) For each nibble add up the numbers with a 1 in the column 8+2+1 and 9+1
5) convert to hexadecimal then put them together. In this case == B9

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What do you do if the binary number can’t be split into nibbles?

A

Add some 0s onto the front.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How do you convert from hex to binary?

A

Convert each hex character into binary then just put them together.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Example: Convert the hexadecimal number 8C to binary:

A

1) First find the denary value of each character 8 = 8 in denary and C = 12 in denary
2) Find the binary value of each denary number 8 = 1000 in binary and 12 = 1100 in binary
3) Put nibbles together 10001100

How well did you know this?
1
Not at all
2
3
4
5
Perfectly