Data Representation in Computers - Answers
Total Page:16
File Type:pdf, Size:1020Kb
Data Representation in Computers - Answers
The OCR Specification says that you should be able to:
Units define the terms bit, nibble, byte, kilobyte, megabyte, gigabyte, terabyte • understand that data needs to be converted into a binary format to be processed by a • computer
Numbers convert positive denary whole numbers (0-255) into 8-bit binary numbers and vice versa • add two 8-bit binary integers and explain overflow errors which may occur • convert positive denary integers (0-255) into 2-digit hexadecimal numbers and vice versa • convert between binary and hexadecimal equivalents of the same number • explain the use of hexadecimal numbers to represent binary numbers •
Characters explain the use of binary codes to represent characters • explain the term character set • describe with examples (for example ASCII and Unicode) the relationship between the • number of bits per character in a character set and the number of characters which can be represented
Images explain the representation of an image as a series of pixels represented in binary • explain the need for metadata to be included in the file such as height, width and colour • depth discuss the effect of colour depth and resolution on the size of an image file •
Sound explain how sound can be sampled and stored in digital form • explain how sampling intervals and other considerations affect the size of a sound file • and the quality of its playback
Instructions explain how instructions are coded as bit patterns • explain how the computer distinguishes between instructions and data • Past Paper Exam questions
Jan 2011
1. (a) Calculate the denary value of the 8-bit binary number 10010111. You must show your working.
128 + 16 + 4 + 2 + 1 •
151 •
[2]
(b) Add the following two 8-bit binary numbers and explain the result. You must show your working.
Points for:
First nibble correct with carries shown •
Second nibble correct •
There is an overflow because the result > 255/cannot be represented in 8-bits •
[3]
2. (a) Explain how ASCII is used to represent text in a computer system.
Each character is given a numeric code
Including symbols, digits, upper and lower case •
This code is then stored in binary •
Each character takes 1 byte • Text is stored as a series of bytes (1 per character) Some codes are reserved for • control characters (eg TAB, Carriage Return)
[3]
(b) State what is meant by the character set of a computer.
All the characters which are recognised/can be represented by the computer system
[1]
(c) Unicode is also used to represent text in a computer system. Explain the difference between the character sets of Unicode and ASCII.
Unicode has a much larger character set and can represent many more characters/characters from all alphabets, because unicode uses 16 bits and ASCII uses fewer/7/8 bits.
[2]
June 2011
3. (a) Convert the hexadecimal number 6A to denary. You must show your working.
6*16(=96)/10 (forA) •
106 •
[2]
(b) Convert the hexadecimal number 6A to binary.
0110 1010 (1 mark per nibble)
[2]
(c) Convert the binary number 00111101 to hexadecimal.
3D (1 mark per digit)
[2]
(d) Explain why hexadecimal numbers are often used to represent binary numbers.
Hex numbers are shorter/more memorable than equivalent binary numbers and can easily be converted to and from binary as each hex digit corresponds to 4 binary digits. A diagram will be accepted.
[2]
Jan 2012 4. Bytes, Kilobytes and Megabytes are units used for the amount of data stored in a computer.
(a) State which of these units is most appropriate for the following items of data.
A one page text document:
Kilobyte(s)
A ten minute movie clip:
Megabyte(s)
A person ’s surname:
Byte(s)
[3]
(b) A computer has a hard disk of 2 Terabytes. How much is this in Gigabytes?
You must show your working.
Multiply by 1024/1000 •
2048/2000 (GB) •
[2]
5. Peter takes a picture of himself and his friends to put on a social networking site. The picture is converted into pixels and stored as a bitmap file.
(a) Tick one box in each row to show whether or not each of the following items must be included in the bitmap file.
[5]
(b) (i) What is meant by the resolution of the picture? The concentration of pixels
[1]
(ii) How does the resolution affect the size of the bitmap file?
2 (The higher the resolution) more pixels are required for the picture which will increase the size of the bitmap file. (Accept lower resolution fewer pixels, smaller size).
[2]
June 2012
6 (a) Convert the denary number 55 to an 8 bit binary number.
0011 0111 (1 mark per nibble)
[2]
(b) Convert the denary number 55 to hexadecimal.
37 (1 mark per digit)
[2]
Jan 2013
7 (a) Add the following bytes.
Award marks for:
111000 for bits 5 to 0
00 for bits 7 and 6
[2]
(b) State the problem that will occur if a computer is to store the result as a byte. 1 There is an overflow/a carry left over after the addition/does not fit into one byte.
[1]
8. When recording a sound file on a computer, the sound needs to be sampled.
(i) Describe how sampling is used when storing sound.
The height/amplitude of the sound wave is measured at regular intervals and converted to binary.
[2]
(ii) Explain the effect of the sampling interval on the size and quality of the sound file recorded.
If the interval is smaller/if you sample more often you have more data to store so a larger file but the sound reproduced is closer to the original so better quality.
[3]
9 (a) Explain why data is stored in computers in a binary format.
Circuit only needs to check for two states/uses switches. Electricity flowing or not flowing/on or off/1 and 0 resulting in more reliable circuits.
[2]
(b) In the ASCII character set, the character codes for the first three capital letters are given below.
(i) State how the ASCII character set is used to represent text i a computer.
Each character is assigned a unique character code
Each letter is converted to its character code (which is a binary number)
[1]
(ii) Convert the word CAB into binary using the ASCII character set.
0100 0011 0100 0001 0100 0010
[1]
(iii) Explain why the ASCII character set is not suitable for representing text in all the languages of the world.
ASCII uses 8 bits and so can only represent 255/256 distinct characters. •
Many more characters are needed for coping with all languages (eg Unicode 16bits). • ASCII does contain characters used in some languages •
[2]