2 – Data representation Flashcards
What is a ‘bit’?
A single 1 or 0 is a binary digit, or a bit for short.
What is a ‘byte’?
A group of eight bits is called a byte.
What is a ‘nibble’?
Four bits, or half a byte, is called a nibble.
What is a kilobyte in bytes and bits?
1000 bytes or 8000 bits make a kilobyte
What are the units of scale for bytes in order?
Kilobyte (kB),
Megabyte (MB),
Gigabyte (GB),
Terabyte (TB),
Petabyte (PB)
What is 7 in binary?
111
What is 30 in binary?
11110
What is 2 in binary?
10
What is 12 in binary?
1100
What is 64 in binary?
1000000
What is an overflow error?
A computer stores things in memory in a finite amount of space. If you cannot represent the number in that amount of space because it is too big, then overflow occurs.
What does shifting a binary number one place to the right do?
Shifting right one place divides the number by 2.
What does shifting a binary number one place to the left do?
Shifting left one place multiplies the number by 2.
What would 10011100 (156 in denary) shifted two to the right become?
10011100 becomes 00100111 which is 39 in denary
How does hexadecimal work?
We can represent every group of 4 bits (known as a nibble) with a single digit.
The smallest value you can hold in 4 bits is 0000. The largest value is 1111. This means that we need to represent the denary values 0 to 15 with a single digit. The trouble is, we only have numerical digits 0 to 9, so to get around this problem we use letters A to F to represent the digits 10, 11, 12, 13, 14 and 15.
How would we convert 182 in denary to hex?
182 / 16 = 11 remainder 6
11 is B in hex. 6 is just 6
so 182 denary = B6 hex