02 Section 7 - Binary and Hexadecimal Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What base is denary/decimal in?

A

base-10

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

What base is binary in?

A

base-2

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

What are the units for 8 bits?

A

128 64 32 16 8 4 2 1

each column is just a power of 2

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

How do you convert from binary to decimal and back again?

A

Always lay out columns with the amount which can be in them, and work logically to work it out both ways

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

How do you add binary numbers?

A

By using column addition

  • work from right to left
  • 0+0 = 0, 0+1 = 1, 1+1 = 10
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is an overflow errors?

A

Overflow errors occur when a number has too many bits

  • an overflow error from the computer getting extra bits, instead the computer will see the extra digit as an overflow error
  • overflow flags are used to show that an overflow error has occurred
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the problems with a computer and overflow errors?

A

An overflow error can lead to a loss of data and a loss of accuracy in the answer.
It could also cause software to crash if the program doesn’t have a way of dealing with the extra bit

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

What is Binary Shift/Logical Shift?

A

Binary shift is when you move every bit in a binary number left or right a certain number of places

  • left shifts times the number by powers of 2
  • right shifts divide the numbers by powers of 2
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What problems can left and right shifts cause?

A

Left shifts can cause overflows
Right shifts can ‘drop off’
-these can both cause a loss of accuracy/data

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

What base are hexadecimal numbers in?

A

base-16

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

What does a single hex character represent in denary numbers or binary numbers?

A

One hex digit can represent

  • decimal- 0-15
  • binary- 4 bits (a nibble)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Why do programmers prefer hex when coding?

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

How do base-16 represent all the characters?

A

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

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

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

What are the units in hex?

A

4096 256 16 1

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

How do you convert from Binary to Hex?

A

Convert Binary to Hex by splitting it into nibbles

  • draw a table and convert each nibble into hex
  • then put the hex digits together
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How do you convert from Hex to Binary?

A

For Hex to Binary, use each character’s denary value

  • convert each hex digit into binary
  • then put the binary nibbles together