What is Binary?
A system of data representation which uses only 1's and 0's. 1 represents on/yes/true and 0 represents off/no/false. This relates directly to transistors in the CPU which can be on or off.
What is a bit?
A single 1 or 0 in Binary.
What is a byte?
8 bits in Binary (8 zeros or ones)
What is a nibble?
4 bits in Binary (half a byte)
List the column headings for a full byte.
128, 64, 32, 16, 8, 4, 2, 1
What is the highest number that can be represented in one full byte?
What is Denary?
Also called Decimal number system. Standard system we use using digits 0 - 9.
What is an overflow error?
An error in a calculation which requires more bits than are available.
In Binary, what are the answers to the following: 0 + 0 1 + 0 1 + 1 1 + 1 + 1
0 + 0 = 0 1 + 0 = 1 1 + 1 = 10 (the binary code for 2) 1 + 1 + 1 = 11 (the binary code for 3)
What effect does a logical shift left have on a Binary number?
Multiplies a number by powers of 2. One left shift x 2^1 Two left shifts x 2^2 Three left shifts x 2^3 etc...
What effect does a logical shift right have on a Binary number?
Divides a number by powers of 2. One right shift / 2^1 Two right shifts / 2^2 Three right shifts /2^3 etc...
Describe the sign and magnitude method of representing negative numbers in Binary.
The Most Significant Bit (MSB - furthest left) is not used to represent a number, but is used for the sign. 1 means negative. 0 means positive.
Why is sign and magnitude not used by computers?
- Zero could be represented as both positive or negative. - Causes errors with binary addition.
Describe the twos complement method of representing negative numbers in Binary.
The Most Significant Bit (MSB - furthest left) is used to represent the negative equivalent of that number. For example in a single byte the columns headings would be: -128, 64, 32, 16, 8, 4, 2, 1
When are arithmetic shifts used?
Arithmetic shifts are used instead of logical shifts for signed numbers. Left to multiply, right to divide.
What is different about carrying out an arithmetic shift as opposed to a logical shift.
Arithmetic shifts are used for signed numbers (+ / -) so the MSB must remain the same as the original to
Describe the Hexidecimal system or data representation.
Explain how to convert an 8 bit Binary number directly into Hexidecimal (without first converting to Denary).
List four uses of Hexidecimal.
Used to help humans cope with long strings of binary digits, as Hex numbers are shorter.
Errors codes are usually given as Hex values.
Used to represent numerical values in assembly language.
In most computers, how are characters and text represented?
Describe ASCII code.
What is meant by a character set?
How many characters can be represented using standard ASCII code?
If the ASCII code for the character ‘C’ is 67, how could you work out the ASCII code for the character ‘M’.
As the codes are consecutive you can work out the number of characters between C and M, and then add this number to 67 to work out the code for M.
Answer = 77
How can you calcate the file size of an image?
This depends on the image size (WxH) and the colour depth (D):
The calculation is W x H x D
The better the image quality, the higher the file size.
A 24 bit image has the dimensions 200 x 300. Construct an expression to calculate the size of the image in MB.
(200 x 300 x 24 ) / 8 / 1024 / 1024
Dividing by 8 converts bits to bytes.
Dividing by 1024 once converts bytes to KB
Dividing by 1024 again converts KB to MB
What is sound sampling?
Sound is an analogue form of data. To convert it to digital you need to take a sample of the sound at particular intervals called the sample frequency. The higher the sample frequency, the higher the quality of the digital sound.
Construct an express to calculate the size of an audio file.
Sample frequency x bit depth x recording length in seconds
Construct an expression to calculate the size in MB of a digital audio file of 4 minutes with a sample frequency of 44.1 KHz and a resolution of 24 bits.
Sample frequency x resolution x recording length in seconds
( 44100 x 24 x 240 ) / 8 / 1024 / 1024
How are binary digits represented inside the computer?
A computer processor uses billions of transistors acting as switches. These can either be ON (1) or OFF(0).
Describe lossless compression and give examples of its use.
- Reduces file size without deleting any data
- Nothing is lost
- Works by looking for redundancy where same data is stored many times
- Used for text files, or smaller graphic files
- Not so good for audio files or larger image files
Describe lossy compression and give examples of its use.
- Reduces the file size by deleting some data
- The original can never be reconstructed
- It works in image files by analysing the image to find areas with slight differences which are given the same value to reduce the number of bits
- It works in audio files by removing small differences in frequency, tone and volume
- Not so good for text files
Convert the string below using run-length encoding. What is the file size before and after?
After RLE the string is:
Before RLE file size is 18 bytes
After RLE file size is 10 bytes
What is the purpose of encryption?
Encryption scrambles sensitive data to ensure only authorised people can read it.
What is symmetric encryption?
Encryption methods which use the same key to both encrypt and decryt the data.
Describe asymmetric encryption.
Asymmetric encryption used two different keys to encrypt and decrypt the message.
A message encrypted with a public key, can only be decypted by the corresponding private key (and vice versa).
Describe the Caeser Cipher method of encryption.
Each character in a message is replaced by another character by shifting each by a number known as the key.
How is data encrypted on the internet?
By using the HTTPS protocol.
This is the HTTP protocol with the SSL/TLS protocol added to it.
Describe the following terms used in databases:
- Primary Key
- Foreign Key