paper 2 - section 7 - data representation Flashcards
what are logic gates?
special circuits built into computer chips. They receive binary data, apply a boolean operation, then output a binary result
how many inputs and outputs do NOT gates have?
one of each
what do not gates do?
the output is always the opposite value to the input. If 1 is input, it outputs 0. If 0 is input, it outputs 1
how many inputs and outputs does an AND gate take?
it takes 2 inputs and gives 1 output
what does an AND gate do?
if both inputs are 1, the output is 1, otherwise the output is 0
how many inputs and outputs does an OR gate have?
2 inputs and 1 output
what does an OR gate do?
if one or more inputs are 1, then the output is 1, otherwise the output is 0
what does a NOT gate look like?
a sideways triangle with a small circle at the tip
what does the AND gate look like?
the letter D
what does an OR gate look like?
an arrowhead
what are two-level logic circuits?
logic circuits that require the inputs to pass through a maximum of 2 logic gates to reach the outputs
what is the symbol for AND?
/\
what is the symbol for OR?
\/
what is the symbol for NOT?
¬
what is the smallest measure of data?
bits
what do computers use to represent the flow of electricity?
binary
does a 1 mean electricity is flowing or isn’t flowing?
is flowing
does a 0 show that electricity is flowing or that it isn’t flowing?
that it isn’t flowing
what is a byte big enough to store?
one character
what is the file size of most files (like songs, pictures and documents) measured in?
kB or MB
what are high definition videos and complex applications often measured in?
gigabytes
what is secondary storage capacity measured in?
gigabytes or terabytes
why is each unit 1024 (not 1000) times bigger than the previous unit?
because 1024 is a power of 2 which is helpful when dealing with binary data
what is the formula to find out how many different values a data unit can take?
2^n where n is the number of bits
what are parity bits used for?
they’re used to check for errors
what are check digits used for?
check digits are a way of checking that data has been entered and read correctly. They are digits added to the end of numbers (e.g. ISBNs on books) and are calculated using other digits in the number. If the check digit is correct when data is read, then it’s likely that the data has been entered/read correctly
what is the check digit called for binary data?
a parity bits
what is an even parity bit used for?
it is added to make a binary string have an even number of 1s
what is an odd parity bit used for?
an odd parity bit is added to make a binary string have an odd number of 1s
what would the even parity bit of the 7-bit string 1010010 be?
1010010 has three 1s, so the even parity bit is 1. This is sent as 10100101
what would the even parity bit of the 7-bit string 1100101 be?
1100101 has four 1s, so the even parity bit is 0. This is sent as 11001010
what would the odd parity bit of the 7-bit string 1010010 be?
it has three 1s, so the odd parity bit is 0. This is send as 10100100.
what would the odd parity bit of the 7-bit string 1100101 be?
it has 4 1s, so the even parity bit is 1. This is sent as 11001011.
what is the problem with parity bits?
if two bits within the same binary string are read incorrectly then no error will be detected. For example, if an even parity bit is used and the binary string 10100000 is read as 10000100 then no error will be picked up.
which denary numbers can 8-bit binary numbers represent?
the denary numbers 0 to 255
which denary numbers can 16-bit binary numbers represent?
the numbers 0 to 65,535
which denary numbers can 32-bit binary numbers represent?
the numbers 0 to 4,294,967,295
when do overflow errors occur?
when a calculation gives a result with more bits than are available to store it. This can be a real problem - programmers must make sure that they can’t occur, or that they are dealt with.
what is used to show that an overflow error has occured?
overflow flags
why are overflow errors a problem?
they can lead to a loss of data and a loss of accuracy in your answer. It could also cause software to crash if it doesn’t have a way of dealing with the extra bit.
what does a binary shift do?
it moves every bit in a binary number left or right a certain number of places
what is another name for a binary shift?
a logical shift
what happens to gaps at the beginning or end of the number in a binary shift?
the gaps are filled in with 0s
what do left shifts (binary shifts) do?
multiply a binary number. For every place shifted left, the number is doubled.
what do right (binary) shifts do?
they divide a binary number. For every place shifted right, the number is halved
how many bits is each hex character equal to?
4 bits (a nibble)
what are the advantages of using hexadecimal?
- it’s simpler to remember large numbers in hex - they’re far shorter than binary numbers
- due to hex numbers being shorter, there’s less chance of input errors
- it’s easier to convert between binary and hex than binary and denary
what do you do if, when you are converting binary to hexadecimal, you can’t split the binary number evenly into nibbles?
you add 0s on the front until there is an exact number of nibbles