# Data Representation Flashcards

What are the five data types?

Integer String Boolean Float Character

How many bits are in a nibble?

4 bits

How many bits are in a byte?

8 bits

What are the binary values?

1 & 0

128 64 32 16 8 4 2 1

What is Hexadecimal?

It is base 16.

It’s used to store values that are larger than 9 and less than 16, with 10 - 15 being replaced with A- F, so A is 10, B is 11, C is 12 and so on.

What is Hexadecimal used for in Web pages?

to create colour values, the maximum potential value is 255 as #FFFFFF

What are the benefits of Hexadecimal?

- It can be used to describe locations in memory because it can represent every byte as two consecutive hexadecimal digits instead of the eight digits that would be required by binary.
- It is much easier for humans to read hexadecimal numbers than binary numbers.

What are the symbols for Boolean algebra?

Not == ¬

And == ^

Or == v

What are the rules for K-Maps and Boolean algebra?

- Make sure you get the 0s and 1s at the top correct – remember they don’t go in normal binary order – you only change 1 bit at a time.
- Only the ones in the diagram count – don’t even bother writing zeros in.
- You have to make your groups in either rectangles or squares. i.e. no diagonals or any other shape.
- Make your groups as large as possible – that’s how you simplify the expression.
- Every 1 has to be in a group. If it ends up being on its own that’s ok its just becomes a group of 1.
- 1s can be in groups of 1, 2, 4, 8 etc. You can’t have a group of 3 or 5.
- Overlapping groups is fine.
- Wrap around is fine.

What are the rules of Binary Addition?

- 0 + 0 = 0
- 0 + 1 = 1
- 1 + 0 = 1
- 1 + 1 = 0 (Carry = 1)

What are the rules of Binary Subtraction?

- 0 - 0 = 0
- 1 - 0 = 1
- 1 - 1 = 0
- 0 - 1 = 0 (Borrow = 1)

What are the rules of Binary Multiplication?

- 0 X 0 = 0
- 0 X 1 = 0
- 1 X 0 = 0
- 1 X 1 = 1

How do you convert Binary into Hexadecimal?

E.G 10100001

- Separate the byte into two nibbles
- Convert the nibbles into numbers
- if the numbers are over 9 they will be converted to Hex, f not they remain the same.

E,G

- 1010 & 0001
- 10 & 1
- 10 > 9 = A
- A1

What is Floating-point arithmetic?

This is where floating point numbers such as decimals are represented in binary.

This is done with the use of a Mantissa and Exponent. The exponent determines the amount of places the decimal place will move and the mantissa represents the number to be converted.

What is the downside to Floating-point arithmetic?

It is near impossible to get an accurate decimal number due to the points getting smaller and smaller