Data Representation Flashcards

1
Q

What are the five data types?

A
Integer
String
Boolean
Float
Character
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How many bits are in a nibble?

A

4 bits

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

How many bits are in a byte?

A

8 bits

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

What are the binary values?

A

1 & 0

128 64 32 16 8 4 2 1

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

What is Hexadecimal?

A

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.

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

What is Hexadecimal used for in Web pages?

A

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

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

What are the benefits of Hexadecimal?

A
  • 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.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the symbols for Boolean algebra?

A

Not == ¬
And == ^
Or == v

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

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

A
  1. 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. 
  2. Only the ones in the diagram count – don’t even bother writing zeros in. 
  3. You have to make your groups in either rectangles or squares. i.e. no diagonals or any other shape. 
  4. Make your groups as large as possible – that’s how you simplify the expression. 
  5. 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. 
  6. 1s can be in groups of 1, 2, 4, 8 etc. You can’t have a group of 3 or 5. 
  7. Overlapping groups is fine. 
  8. Wrap around is fine. 
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the rules of Binary Addition?

A
  • 0 + 0 = 0
  • 0 + 1 = 1
  • 1 + 0 = 1
  • 1 + 1 = 0 (Carry = 1)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the rules of Binary Subtraction?

A
  • 0 - 0 = 0
  • 1 - 0 = 1
  • 1 - 1 = 0
  • 0 - 1 = 0 (Borrow = 1)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are the rules of Binary Multiplication?

A
  • 0 X 0 = 0
  • 0 X 1 = 0
  • 1 X 0 = 0
  • 1 X 1 = 1
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How do you convert Binary into Hexadecimal?

E.G 10100001

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

E,G

  1. 1010 & 0001
  2. 10 & 1
  3. 10 > 9 = A
  4. A1
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is Floating-point arithmetic?

A

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.

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

What is the downside to Floating-point arithmetic?

A

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

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

What are the bitwise manipulation operators?

A
AND = &
OR = |
XOR = ^
COMPLEMENT = ~
SHIFT R = >>
SHIFT L = <
17
Q

What is the complement operator for bitwise manipulation?

A

The COMPLEMENT operand simply inverts all the bits so all the ones become zeros and all the zeros become ones.