Memory and storage Part 2 Flashcards
Data Representation
What is binary?
Binary is a number system consisting of only 0s and 1s
Why must data be stored in a binary format?
Computers consist of billions of transistors, which are switches, that only contain two values - on and off. Therefore all data must be represented and processed this way.
Everything that a computer needs to process must be converted into binary format, including text, images, video and audio.
What are the different units of data storage and how many bytes are in each one?
1 bit = a single 0 or 1
1 nibble = 4 bits
1 byte = 8 bits = 1 character of text
1KB (kilobyte) = 1000 bytes
1MB (megabyte) = 1000 kilobytes
1GB (gigabyte) = 1000 gigabytes
1TB (terabyte) = 1000 gigabytes
1PB (petabyte) = 1000 terabytes
How many possible combinations or states can 5 switches produce?
32 (basically 2 to the power of that number, as binary is a base 2 system)
What is the most significant bit? (MSB)
The bit with the largest value (furthest to the left)
What is the least significant bit? (LSB)
The bit with the smallest value (furthest to the right)
What is 28 in binary using 8 bit binary?
00011100
What is 1010111 in denary?
87
What are the 16 times tables (up to16*16)
16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240, 256
What are the powers of 2 (up to 2^20)
2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16348 32768 65536 1310722 262144 524288 1048576
Convert BB from hex to denary
187
Convert 106 from denary to hex
6A
Convert 83 from hex to binary
10000011
Convert 00111110 from binary to hex
3E
Why do programmers use hex?
It is simpler to remember a hex value than a binary value
It is quicker to write or type
People are less likely to make an error with fewer digits
It is easy to convert between hex and denary
NB: never refer to computers when answer this question, as they only understand binary! Hex is purely for the people!
What is overflow error?
When the result of an addition is too large for the number of bits the computer works with, there will be an overflow error
What does a binary shift left of one bit do?
it moves all the bits one place to the left, with the vacant bit spaces filling up with zeros, and DOUBLES the number
What does a binary shift right of 2 places result in?
It halves the number and rounds down each time, essentially dividing by 4 (2^2)
What are the effects of logical shifts?
Logical shifts can very quickly multiply or divide a binary number by a factor of two
A loss of accuracy can occur if 1 bits are removed
Around how many unique characters are available on a keyboard, and therefore how many bits should be used?
There are around 98 unique characters, therefore 7 bit binary should be used to represent them
What is a character set and how is it ordered?
A character set is a set of letters, numbers, symbols and digits that can be represented by a computer.
Character sets are ordered logically, so the code for ‘B’ will be one greater than the code for ‘A’.
What are the two major character sets in use today?
ASCII and Unicode