Flashcards in S4 - Data representation (Done) Deck (67)
What are the three logic gates ?
NOT, AND and OR.
What are logic gates ?
Special circuits built into computer chips, which receive binary data, apply a boolean operation and then output a binary result.
What is a NOT gate ?
They take and give a single output, the output being the opposite of the input.
What is an AND gate ?
They take two inputs and give one output, if both inputs are 1 the output is one, otherwise the output is 0.
What is an OR gate ?
They take two inputs and give one output, if one or more inputs are 1 then the output will be one, otherwise the output is 0.
What do the 1s and 0s used by computers actually represent ?
The flow of electricity, 1 meaning there is a flow, 0 meaning there isn't a flow.
What is a bit ?
A single binary digit.
What is a nibble ?
What is a byte ?
What is a kilobyte ?
What is a megabyte ?
What is a gigabyte ?
What is a terabyte ?
How many values can a nibble take ?
Made up of 4 bits so 2^n (where n equals number of bits) so 2^4 = 16 different values.
How many values can a byte take ?
Made up of 8 bits so 2^8 = 256 different values.
What is the standard number system called ?
Decimal, denary or base-10, as it uses 10 different digits.
What is binary called ?
Base-2, as it only uses 2 digits (1 and 0).
What are the rules for addition in binary ?
0 + 0 = 0, 1 + 0 = 1, 1 + 1 = 0 carry the 1, 1 + 1 + 1 = 1 carry the 1.
What does a left binary shift do ?
Multiplies the number, for every place shifted left the number is doubled. So 2^n (n = number of places shifted) to calculate what the number is multiplied by.
What does a right binary shift do ?
Divides the number, for every place shifted right the number is halved. So 2^n (n = number of places shifted) to calculate what the number is divided by.
What is hexadecimal ?
Base-16, uses 16 different digits - each hex character equates to a nibble in binary.
Why is hex preferred when coding ?
Simpler to remember large numbers in hex - they're shorter than binary, due to this lower chance of input errors and it's easier to convert between binary and hex than binary and decimal.
How do place values in hex change ?
Increase in powers of 16 from right to left - 4096, 256, 16, 1
How can you convert between hex to decimal ?
Write the hex digits under each ones correct place value and then multiply the hex digit by the place value and add the products together to get the decimal number.
How do you convert from decimal straight to hex ?
Check what the maximum place holder value that the decimal number can be divided by to be greater than 1 and draw out the place holder table up to this number, divide the decimal number by the first place value and then take the remainder and put this in the other place holder.
How can you convert from binary to hex ?
If each hex digit equates to a nibble in binary split the binary into 4-bit chunks and work out the decimal and then subsequent hex value for each chunk and then put the hex digits back together.
How do you go form a hex value to a binary value ?
Convert the hex digit into decimal and then from decimal into the 4-bit chunk of binary code and then put the 4-bit chunks back together to give one long string.
What are alphanumeric characters ?
The characters used to make up words and strings including uppercase and lowercase letters, digits and symbols.
What are character sets ?
Collections of characters that a computer recognises from their binary representation (i.e ASCII)