Data Storage Flashcards
What are the units in Computer Science
Bit
Nibble
Byte
Kilobyte
Megabyte
Gigabyte
Terabyte
Petabyte
Hertz
How many bits in a byte
8
How many bits or bytes in a nibble
Half a byte
4 bits
How many bytes in a kilobyte
1000
How many kilobytes in a megabyte
1000 kilobytes
or 1 million bytes
How many megabytes in a gigabyte
1000 megabytes
How many gigabytes in a terabyte
1000 gigabytes
How many terabytes in a petabyte
1000 terabytes
What are the two only states that a computer can understand
Power on
Power off
What is the power term called
Switches
What are switches represented by
Power on represents a 1
Power off represents a 0
What is the table layout for binary and denary
128, 64, 32, 16, 8, 4, 2 1
What is denary
A whole number
What is binary
An 8 bit number
What is 32 in binary. Show steps
128, 64, 32, 16, 8, 4, 2 1
0 0 1 0 0 0 0 0
00100000
What is 78 in binary
128 64 32 16 8 4 2 1
0 1 0 0 1 1 1 0
01001110
How do we convert binary to denary
128, 64, 32, 16, 8, 4, 2 1
If there is a 0 under a number, we don’t add that number up. If there is a 1 under the number, we add that number. For example If we have the binary number of
10001001
Substitute this in the table.
There is a 1 underneath 128, 8 and 1, so add all those numbers up, which makes 137. For this example we say that 10001001 is 137 in denary
Convert 00100111 into binary
39
Whats the highest possible denary number and binary number
11111111
255
What is hexadecimal
A number that uses a base of 16. It starts from 0 to 9, then from A to F
How do we convert hexadecimal to denary
Multiply the left hand digit by 16, then add the units
How do we convert hex 7 to denary
Multiply 7 and 16.
Then add 10
Hex 7 is 122 in denary form and 7 in decimal form
What is hex 27 in denary
(2x16) + 7 = 39 in denary form
How do we convert denary to hexadecimal
Divide the denary number by 16. The remainder gives the units.
What is denary 72 in hexadecimal
72/16 = 4.5: 4 remainder 5
45 in hexadecimal
How do we convert binary to hexadecimal
- Take a binary word of 8 bits
11100101 - Divide into two nibbles of 4 bits
1110 and 0101 - Convert each nibble into its hexadecimal value
1110 = 14 = E in Hex
0101 = 5 in Hex
11100101 = E5 in Hex
How do we convert hexadecimal to binary. What is 3B in binary
Split the two hex characters
3 = 0011 and B = 1011
3B = 00111011
What is A5 in binary
A = 10 = 1010
5 = 0101
A5 in hex = 10100101
What is hex 21 in binary
2 = 0010 and 1 = 0001
21 in hex = 00100001
Why do we use hex
- It is easier to convert between hex and binary
- People are likely to make less digit errors
- Quicker to write and type since hex digit only takes up 1 digit rather than 4 bits
- Much simpler to remember a hex value than a binary value
- An advantage for programmers and Computer Scientists
How does numbers work on computers
Computers work with a fixed number of bits at a time.
What is an overflow error
When the result of the addition is too large for the number of bits that a computer works with
What are the two logical binary shift operations
Left shift
Right shift
What is a binary shift left
A binary shift left of one bit moves all the bits one place to the left. The vacant bit spaces are replaced with 0
How does a binary shift left have an affect on the number
The number is doubled
Eg: 1000 = 8
Shift left once = 10000 = 16
What is a binary shift right and what is the effect
A binary shift right of two places halves the number and rounds down each time
Eg:
1000 = 8
Shift right once = 100 = 4
Shift right twice = 10 = 2
Eg: 2
1001 = 9
Shift right once = 100 = 4
Shift right twice = 10 = 2
What are the effects of shifts
They can quickly multiply or divide the binary number by 2
How are characters represented in binary
Every character on the keyboard is represented by a binary number.
Uppercase letters (capitals) have different values from lowercase letters
Punctuation symbols have their own character code
What are the four mandatory components that a computer needs to contain
26 lowercase letters
26 uppercase letters
10 numbers
36 other characters
This creates 98 total characters
What is a character set
Collection of characters that a computer recognises from a binary representation
What are character sets a set of
Letters
Symbols
Digits
What are three major character sets used today
ASCII
Extended ASCII
Unicode
What is ASCII
A 7 bit character code, that has 128 different characters that can be encoded.
What is ASCII Extended
An 8 bit character code, that has 256 different characters that can be encoded.
How are ASCII character codes setup
ASCII codes are normally grouped and ran in sequences.
What are some types of character codes
7 bit character code
8 bit character code
16 bit character code