Unit 2: Data Representation Flashcards
What is Binary Shift?
A binary shift is when the digits of a binary are moved either to the left or the right for multiplicative or division purposes. These are usually faster faster than normal multiplication and division.
A left shit represents multiplication by 2. All digits are shifted one position to the left and a 0 is added to fill in the gap at the end.
In a left shit, if a digit falls off the end, this is an overflow error.
A right shift represents division by 2. Alldigits are moved 1 position to the right and a 0 is added to fill the gap at the start.
In a right shift, if a 1 digit falls off the end, this is an underflow error.
What do scientists use ‘1’ and ‘0’ for?
To represent that
1 is ON
0 is OFF
How do you convert from Binary to Hexadecimal?
- Split the binary string up into nibbles (remember a nibble = 4 bits)
- Work out the decimal value for each nibble
- Convert the decimal value into it’s hex equivalent
- String together the hex values
How do you convert from Hexadecimal to Decimal?
- Write the place headings above the hexadecimal digits.
- If there are letters, convert them to their decimal equivalent.
- Multiply the value by the place heading.
- Add these values together
How do you convert from Decimal to Hexadecimal?
- Work out how many 16s there are in the number
- Write this number under the 16s column
- Write the remainder under the 1s column
- Covert these to hexadecimal digits (if applicable)
What is meant by a character set?
All characters, including letters, numbers and punctuation, they are all represented by binary numbers.