1.0300   We Already know that the ASCII Charatcer ‘F’ is stored as the integer value 70. What is the difference (in terms of RAM storage) between storing the integer 70 and the character ‘F’ ?

 

The INTEGER 70 would be stored using 4-bytes (if the data type integer is used) or using 2-bytes (if the data type short is used):

 

7010 à  10001102

 

0

0

0

0

0

0

0

0

0

1

0

0

0

1

1

0

 On 16-bits

 

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

1

0

0

0

1

1

0

 

(on 32-bits)

 

The CHARACTER ‘F’ would be stored as the integer 70 on 1-byte:

 

0

1

0

0

0

1

1

0