Topic 3 Data Flashcards
What is Binary?
A system of data representation which uses only 1’s and 0’s. 1 represents on/yes/true and 0 represents off/no/false. This relates directly to transistors in the CPU which can be on or off.
What is a bit?
A single 1 or 0 in Binary.
What is a byte?
8 bits in Binary (8 zeros or ones)
What is a nibble?
4 bits in Binary (half a byte)
List the column headings for a full byte.
128, 64, 32, 16, 8, 4, 2, 1
What is the highest number that can be represented in one full byte?
255
What is Denary?
Also called Decimal number system. Standard system we use using digits 0 - 9.
What is an overflow error?
An error in a calculation which requires more bits than are available.
In Binary, what are the answers to the following: 0 + 0 1 + 0 1 + 1 1 + 1 + 1
0 + 0 = 0 1 + 0 = 1 1 + 1 = 10 (the binary code for 2) 1 + 1 + 1 = 11 (the binary code for 3)
What effect does a logical shift left have on a Binary number?
Multiplies a number by powers of 2. One left shift x 2^1 Two left shifts x 2^2 Three left shifts x 2^3 etc…
What effect does a logical shift right have on a Binary number?
Divides a number by powers of 2. One right shift / 2^1 Two right shifts / 2^2 Three right shifts /2^3 etc…
Describe the sign and magnitude method of representing negative numbers in Binary.
The Most Significant Bit (MSB - furthest left) is not used to represent a number, but is used for the sign. 1 means negative. 0 means positive.
Why is sign and magnitude not used by computers?
- Zero could be represented as both positive or negative. - Causes errors with binary addition.
Describe the twos complement method of representing negative numbers in Binary.
The Most Significant Bit (MSB - furthest left) is used to represent the negative equivalent of that number. For example in a single byte the columns headings would be: -128, 64, 32, 16, 8, 4, 2, 1
When are arithmetic shifts used?
Arithmetic shifts are used instead of logical shifts for signed numbers. Left to multiply, right to divide.
What is different about carrying out an arithmetic shift as opposed to a logical shift.
Arithmetic shifts are used for signed numbers (+ / -) so the MSB must remain the same as the original to