0% found this document useful (0 votes)
56 views5 pages

Ascii: Homework 1 - Text Representation

This document contains sample homework questions related to data representation in computer systems. It covers topics like ASCII, Unicode, binary number representation, floating point representation, image representation as bitmaps and vectors, and calculating file sizes of images with different color depths and resolutions. Some key points are: - Unicode uses more bits (typically 16) than ASCII to represent a larger range of characters from different languages. - Negative integers in two's complement binary representation can be stored in a single byte, ranging from -128 to 127. - Images can be represented as bitmaps by assigning a color value to each pixel, or as vectors by describing objects with attributes like position and size. - Reducing the color depth

Uploaded by

savio77
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views5 pages

Ascii: Homework 1 - Text Representation

This document contains sample homework questions related to data representation in computer systems. It covers topics like ASCII, Unicode, binary number representation, floating point representation, image representation as bitmaps and vectors, and calculating file sizes of images with different color depths and resolutions. Some key points are: - Unicode uses more bits (typically 16) than ASCII to represent a larger range of characters from different languages. - Negative integers in two's complement binary representation can be stored in a single byte, ranging from -128 to 127. - Images can be represented as bitmaps by assigning a color value to each pixel, or as vectors by describing objects with attributes like position and size. - Reducing the color depth

Uploaded by

savio77
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 5

Higher Computing Computer Systems : Data Representation Homework

Homework 1 - Text Representation


1. Describe how ASCII is used to represent text. 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. Larger range of characters, i.e. 65536 an cope !ith the characters of a"" "anguages 3. 1

ASCII and UNIC D! are both used to represent text in computer s"stems. #a$ Describe one ad%anta&e of UNIC D! o%er ASCII.
Larger range of characters, i.e. 65536 an cope !ith the characters of a"" "anguages #b$ Describe one disad%anta&e of UNIC D! o%er ASCII.

#sing #$% &'E each character re(uires ) bytes of storage !hereas in *+ %% 1 byte of storage is re(uired #'$

Homework 2 1.

um!er Representation

ne method of representin& a ne&ati%e inte&er in a computer is b" usin& the two(s comp)ement of the correspondin& positi%e inte&er. *hich of the fo))owin& is the + bit two(s comp)ement representation of ,-. #a$ /////111 #b$ 1////111 #c$ 11111//1 1 c 11111,,1

2.

Describe one wa" of storin& a rea) number in computer memor".

-he number is bro.en do!n in to the mantissa and the e/ponent and each part is stored separate"y in memory. 3. *hat is the + bit two0s comp)ement representation of the number ,-2. 1,11 1,,, 1

'.

In computer s"stems1 inte&ers are stored usin& two(s comp)ement representation. *hat wou)d be the ran&e of inte&ers which cou)d be stored in one b"te if two(s comp)ement representation was used. 1

,12+ to 122. In computer s"stems1 )ar&e numbers are stored usin& f)oatin& point representation. State the effect of increasin& the number of bits used to store3 #i$ the mantissa4 #ii$ the exponent. 2 (i (ii 5. %ncreased precision of number stored increased range of numbers can be stored 2

6i%e two reasons wh" computers use binar" numbers to represent and store data. on"y four ru"es of addition , and 1 easi"y represent on and off signa" degradation has no effect

-.

*hich one of the fo))owin& is the +,bit two(s comp)ement representation of ,1'. #a$ 1111///1 #b$ 1111//1/ #c$ 1///111/ #d$ 1111//11 b 1111 ,,1,

+.

*rite the binar" number 1///1//111 as a positive inte&er. 551

7.

8epresent the decima) number 9-3 usin& + bit two0s comp)ement. 1,11 ,111

1/.

Con%ert this +,bit two0s comp)ement binar" number into a decima). 11/1//11 015

#12$

Homework " - #raphi$ Representation


1. A scanner is used to scan a 2 in b" - in photo&raph at 5// dpi in 225 co)ours. :ow much memor" wou)d be re;uired to store the scanned ima&e. 5 / 6,, / 7 / 6,, / 8 1,,8,,,,,(bits)28 1)6,,,,,(bytes)21,)1 1)3,1.7(.b)21,)1 1) 3b 2. <he ima&e in =i&ure 1 has been created usin& a &raphics pac>a&e.

H %ones &nterprises
=i&ure 1 Describe two wa"s in which this ima&e cou)d be represented in memor".

'

As a bitmap. -he comp"ete image is represented by a grid of pi/e"s. Each pi/e" is assigned a number !hich represents its co"our or tone. -his number is stored in memory. As a vector. Each ob4ect is represented by a set of ob4ect attributes. E.g. a "ine may be described by its starting point, "ength and thic.ness. -he 5a"ues of the ob4ect attributes are stored in memory. 3. A scanned ima&e measures 3 inches b" ' inches. It was scanned at 5// dpi in 225 co)ours. Ca)cu)ate the stora&e re;uirements for the scanned ima&e in me&ab"tes. Show a)) "our wor>in&. 2 6,, / 3 / 6,, / 1 / 8 3156,,,,(bits)28 13),,,,(bytes)21,)1 1)18.8(.b)21,)1 1.1 3b '. <wo %ersions of the ima&e be)ow ha%e been created. the other in a %ector &raphic pac>a&e. ne in a bit,mapped &raphic pac>a&e and

If a circ)e is added to the centre of the &raphic1 what is the effect on the fi)e si?e in each case. 2 %t !ou"d ha5e no effect on the fi"e si6e of the bit0mapped graphic and the fi"e si6e of the 5ector graphic !ou"d increase.

2.

@ohn uses his di&ita) camera to ta>e photo&raphs. It has a 212 Me&ab"te memor" card. :is camera uses 151---1215 co)ours and is set to a reso)ution of 3/// A 2/// pixe)s. #a$ Ca)cu)ate the fi)e si?e of a sin&)e ima&e. Bour answer shou)d be in appropriate units. Show a'' wor>in&. 3 3,,, / ),,, / )1 111,,,,,,(bits)28 18,,,,,,(bytes)21,)1 17578.1(.b)21,)1 17.) 3b #b$ *hat is the maximum number of ima&es of this si?e that can be stored on @ohn0s memor" card. 2 51)217.) )7.) therefore )7 pictures can be stored #c$ :e chan&es the settin& in his camera to reduce the bit,depth. Describe one effect that this wi)) ha%e. it !i"" reduce the co"our (ua"ity in the picture

5.

State the number of bits re;uired to represent 15 --- 215 co)ours. )1

-.

Caro)"n reduces the bit,depth of photo&raphs from 2' bits to 15 bits before sa%in& them onto the hard dis> of her computer. #a$ Describe one ad%anta&e of reducin& the bit,depth of the photo&raphs from 2' to 15. 2 it !i"" be "ess demanding on storage #b$ Describe one disad%anta&e of reducin& the bit,depth of the photo&raphs from 2' to 15. it !i"" reduce the co"our (ua"ity #c$ A ' inch b" 5 inch photo&raph with a reso)ution of 5// dpi and usin& 15,bit co)our depth is stored. Ca)cu)ate the fi)e si?e of the photo&raph. State "our answer usin& appropriate units. Show a)) "our wor>in&. 3 1 / 6,, / 6 / 6,, / 16 138)1,,,,(bits)28 17)8,,,,(bytes)21,)1 16875(.b)21,)1 16.5 3b

#2'$

You might also like