Exercise on Data Representation
1.
Fill in the table
below by converting between the various number systems:
Decimal 
Binary 
Hexadecimal 
201 



100110 



B6 
2.
Fill in the table
below by converting between the various number systems:
Decimal 
Binary 
Hexadecimal 
157 



11011011 



2E 
3.
The numbers 71 and 62
are stored in registers A and B in two’s complement form. Demonstrate how the
computer works out 7162 in binary.
4.
Name one other
character set (besides ASCII) that is in more widespread use nowadays. Why has
this character set become more common?
5.
Consider an 8bit
unsigned register.
a) What is the range of decimal values that can be
stored in this register?
b) Write down the binary contents of this register
when it is storing the decimal number 109. Show your working.
c) Express the contents of this register in
hexadecimal. Show your working.
d) Given that the ASCII code for ‘a’ is 97, write
the character that this register will be storing if it were representing text in
ASCII. Show your working.
6.
Consider an 8bit two’s
complement register A which currently contains the binary value 00101111.
a) Determine the value of the register in decimal.
b) Determine the value of the register in
hexadecimal.
c) Determine the largest positive value that this
register can store.
The contents of the
register are shifted by one bit to the left.
d) State which mathematical operation this action
corresponds to.
The contents of the
register are now complemented.
e) Perform the complementation of the contents of
the register.
f) State which mathematical operation this action
corresponds to.
Another identical
register B contains the binary value 01101000
g) State what happens if the contents of A and B
are added together.
h) Perform the addition between the contents of
register A and B.
7.
A custom text encoding
system utilises 6 bits to represent each character.
a) State the amount of different characters that
can be represented using this system.
b) Assuming all letters are encoded sequentially,
if the letter ‘j’ is represented by the decimal number 35, state which letter
is represented by the binary number 101000.
c) State what the following abbreviations stand
for:
i) ASCII
ii) UTF
d) Answer True (T) or False (F) to the following:
ASCII has more control characters than printable
characters. 

Extended ASCII can only represent words in
the English language. 

ASCII can represent at most 256 characters. 

UTF was meant to be able to represent
characters from any language. 

8.