3.3 Data Representation Flashcards
What is binary?
A number system that uses 1s and 0s
Why is Binary used?
Because it has two states (1 and 0) which can represent on/off, true/false, open/closed for example
What is binary used for in a computer?
Computers are based on circuits with switches that are either open or closed. The binary number system can therefore be used to change the switches because it also has two states of 1 and 0
What is the Most Significant Bit (MSB)?
Bit furthest to the left with the largest place value
What is the Least Significant Bit (LSB)
Bit furthest to the right with the lowest place value
How to work out the number of binary representations?
2^n
How to work out the largest number in a certain number of bits?
2^n - 1
n is the number of bits
What are the different sizes of storage?
bit (b) = 0 or 1 or 1/8 byte
nibble = 4 bits or 1/2 byte
byte (B) = 8 bits
kilobyte (KB) = 1 000 bytes
megabyte (MB) = 1 000 000 bytes
gigabyte (GB) = 1 000 000 000 bytes
terabyte (TB) = 1 000 000 000 000 bytes
What is an overflow error?
The result of the addition is too large to store in 8 bits i.e the result is greater than 255
How do you convert from hexadecimal to denary?
16 |1 |
3 |B |
(3 x 16)| + 11 |= 59
How do you convert from denary to hexadecimal?
229 / 16 = 14 (E) remainder 5 = E5
Who uses hexadecimal?
Humans - programmers, Computer Scientists
Computers ALWAYS use binary
Why use hexadecimal?
- Easier to remember a hex number than a binary number
-Because it is a more compact form -
four binary digits are represented with
a single hex value
-Therefore it is less likely that
errors are made - It is easy to convert between hex and binary
What are the effects of shifts?
Direction| Places | Outcome
Left | 1 | x 2
Left | 2 | x 4
Left | 3 | x 8
Left | 4 | x 16
Right | 1 | / 2
Right | 2 | / 4
Right | 3 | / 8
Right | 4 | / 16
LEFT = multiply
RIGHT = divide
What are the effects of a right shift?
Loss of accuracy as bits may be lost