Data Representation Flashcards
What is binary?
A number system which uses only two digits, 0 and 1
What is a bit?
One binary digit (can be one or zero)
What is a byte?
A group of 8 bits
What is a word?
A group of bytes (word size depends on the type of computer e.g. 8 byte machine has an 8 byte word size)
What is a denary number system?
A number system which uses the digits 0..9 (like our own number system)
What does a number base specify?
How much each digit is multiplied as you move from right to left
What base does the binary system have? What does this mean
base 2 -so place values are increasing powers of 2
What is another word for decimal?
denary
What is the range of numbers which can be stored with 8 bits?
0..255
How many values can be stored using 8 bits?
256 (includes zero)
What is twos complement?
A system for representing negative binary numbers
In twos complement, how can you tell if the number represented is negative?
It will start with a one
How would you convert a negative decimal number to twos complement?
-Make the decimal number positive -Convert this to binary -change all the ones to zeros and the zeros to ones -add one to the result
How do you change the sign of a binary number?
-start from the right -leave all digits up to and including the first one -change all other ones to zeros and zeros to ones
What is the first method of converting a negative twos complement number to denary?
-flip the bits -add one -convert the binary to denary