advertisement

Higher Computing – Computer Systems : Data Representation Homework Homework 1 - Text Representation 1. Describe how ASCII is used to represent text. 1 Each binary character is represented by a 7 bit binary number (accept 8 bit or 1 byte) 2. Most modern computers use Unicode rather than ASCII to represent text. State one advantage of Unicode when compared to ASCII. 1 Larger range of characters, i.e. 65536 Can cope with the characters of all languages 3. ASCII and UNICODE are both used to represent text in computer systems. (a) Describe one advantage of UNICODE over ASCII. 1 Larger range of characters, i.e. 65536 Can cope with the characters of all languages (b) Describe one disadvantage of UNICODE over ASCII. 1 Using UNICODE each character requires 2 bytes of storage whereas in ASCII 1 byte of storage is required (4) Homework 2 - Number Representation 1. One method of representing a negative integer in a computer is by using the two's complement of the corresponding positive integer. Which of the following is the 8 bit two's complement representation of -7? (a) 00000111 (b) 10000111 (c) 11111001 1 c 11111001 2. Describe one way of storing a real number in computer memory. 1 The number is broken down in to the mantissa and the exponent and each part is stored separately in memory. 3. What is the 8 bit two’s complement representation of the number -72? 1011 1000 1 4. In computer systems, integers are stored using two's complement representation. What would be the range of integers which could be stored in one byte if two's complement representation was used? 1 -128 to 127 5. In computer systems, large numbers are stored using floating point representation. State the effect of increasing the number of bits used to store: (i) the mantissa; (ii) the exponent. 2 (i (ii 6. Increased precision of number stored increased range of numbers can be stored Give two reasons why computers use binary numbers to represent and store data. 2 only four rules of addition 0 and 1 easily represent on and off signal degradation has no effect 7. Which one of the following is the 8-bit two's complement representation of -14? (a) 11110001 (b) 11110010 (c) 10001110 (d) 11110011 1 b 1111 0010 8. Write the binary number 1000100111 as a positive integer. 1 551 9. Represent the decimal number –73 using 8 bit two’s complement. 1 1011 0111 10. Convert this 8-bit two’s complement binary number into a decimal. 11010011 1 -45 (12) Homework 3 - Graphic Representation 1. A scanner is used to scan a 5 in by 7 in photograph at 600 dpi in 256 colours. How much memory would be required to store the scanned image? 2 5 x 600 x 7 x 600 x 8 100800000(bits)/8 12600000(bytes)/1024 12304.7(kb)/1024 12 Mb 2. The image in Figure 1 has been created using a graphics package. H Jones Enterprises Figure 1 Describe two ways in which this image could be represented in memory. 4 As a bitmap. The complete image is represented by a grid of pixels. Each pixel is assigned a number which represents its colour or tone. This number is stored in memory. As a vector. Each object is represented by a set of object attributes. E.g. a line may be described by its starting point, length and thickness. The values of the object attributes are stored in memory. 3. A scanned image measures 3 inches by 4 inches. It was scanned at 600 dpi in 256 colours. Calculate the storage requirements for the scanned image in megabytes. Show all your working. 2 600 x 3 x 600 x 4 x 8 34560000(bits)/8 4320000(bytes)/1024 4218.8(kb)/1024 4.1 Mb 4. Two versions of the image below have been created. One in a bit-mapped graphic package and the other in a vector graphic package. If a circle is added to the centre of the graphic, what is the effect on the file size in each case? 2 It would have no effect on the file size of the bit-mapped graphic and the file size of the vector graphic would increase. 5. John uses his digital camera to take photographs. It has a 512 Megabyte memory card. His camera uses 16,777,216 colours and is set to a resolution of 3000 × 2000 pixels. (a) Calculate the file size of a single image. Your answer should be in appropriate units. Show all working. 3 3000 x 2000 x 24 144000000(bits)/8 18000000(bytes)/1024 17578.1(kb)/1024 17.2 Mb (b) What is the maximum number of images of this size that can be stored on John’s memory card? 2 512/17.2 29.2 therefore 29 pictures can be stored (c) He changes the setting in his camera to reduce the bit-depth. Describe one effect that this will have. 1 it will reduce the colour quality in the picture 6. State the number of bits required to represent 16 777 216 colours. 1 24 7. Carolyn reduces the bit-depth of photographs from 24 bits to 16 bits before saving them onto the hard disk of her computer. (a) Describe one advantage of reducing the bit-depth of the photographs from 24 to 16. 2 it will be less demanding on storage (b) Describe one disadvantage of reducing the bit-depth of the photographs from 24 to 16. 2 it will reduce the colour quality (c) A 4 inch by 6 inch photograph with a resolution of 600 dpi and using 16-bit colour depth is stored. Calculate the file size of the photograph. State your answer using appropriate units. Show all your working. 3 4 x 600 x 6 x 600 x 16 138240000(bits)/8 17280000(bytes)/1024 16875(kb)/1024 16.5 Mb (24)