1.1.2 Hexadecimal Flashcards

Data representation

1
Q

Why do programmers use hexadecimal?

A

They use hexadecimal as it is easier to read then binary as a byte can be represented shorter. Makes programs easier to debug.

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

Uses of hexadecimal notation:

A

Used for colour in HTML, normally 6 digits.
Windows error codes are in hex.
Mac adresses are 12 digit hex codes.

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

Why is hexadecimal used in machine code?

A

Machine code consists of simple instructions and is directly executed by CPU. A byte can be coded as two hex symbols hence it is used in machine code

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

How do you convert denary to hex?

A

Divide number by 16 and note result and times anything after decimal point by 16. Then keep repeating by diving result and times anything after decimal point by 16 until result is 0 and cannot be divided. Read remainder times 16 bottom up and that there is your hex

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

How do you convert from hex to denary?

A

Put number in grind with the units above it and then multiply units by the value and then sum it all up.

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

How do you convert binary to hex?

A

Break into nibbles from r - l and find denary value and note it. Read values from left to right.

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

How do you convert hexadecimal to binary?

A

Break it up into all its digits and write down binary value of digit add together and that is the binary

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