Bruce Sloan 9684555

BTEC National Certificate for ICT Practitioners

Computer Systems

Assignment 1 – Internal Operations

  1. Explain why ASCII codes are either 7-bit or 8-bit but are always stored as single byte lengths. Give six examples of ASCII codes, covering alphabetic, numeric, punctuation and control characters. Show their binary and hexadecimal values.

ASCII is, strictly, a seven-bit code, meaning it uses the bit patterns representable with seven binary digits (a range of 0 to 127 decimal) to represent character information. At the time ASCII was introduced, many computers dealt with eight-bit groups (bytes or, more specifically, octets) as the smallest unit of information; the eighth bit was commonly used as a parity bit for error checking on communication lines or other device-specific functions. Machines which did not use parity typically set the eighth bit to zero, though some systems such as Prime machines running PRIMOS set the eighth bit of ASCII characters to one. The original ASCII only used 7-binary digits and was referred to as a 7 bit code, also hence the code only extending to 127. Over the evolution of time the code became 8-bit to increase the code to 128 allowing additional characters.

They are always stored as single byte lengths due to the system allowing the process this data either way. The 8-bit standards of ASCII are just a further extension or development though the original 7-bit ASCII remains the most common character encodings used today.

  1. Covert the decimal numbers 8, 27 and 187 into 8-bit binary and two digit hexadecimal numbers. Show your working and explain any special techniques.

  • 8 – because this is fairly simple, I have just added a 1 in the 8 column:

        

 00001000 ( 8-bit binary), 08 ( hexadecimal)

  • 27 – this is a little more difficult and so have shown my workings:

27 – 128 = 0

27 – 64 = 0

27 – 32 = 0

27 – 16 = 11 = 1

11 – 8 = 3 = 1

3 – 4 = 0

3 - 2 = 1= 1

1 – 1 = 0 = 1        

so 27 = 00011011 in 8-bit binary

This means that hexadecimal is 1 and 8  + 2 + 1 = 1B

  • 187 -

187 – 128 = 59 = 1

59 – 64 = 0

59 – 32 = 27 = 1

27 – 16 = 11 = 1

11 – 8 = 3 = 1

3 – 4 = 0

3 – 2 = 1 = 1

1 – 1 = 0 = 1

so 187 = 10111011

This means that hexadecimal is ( 8 + 2 + 1 ) + ( 8 + 2 + 1 ) = BB

  1. Using twos compliment, show how the two 8-bit binary numbers representing 68 and 112 can be added, subtracted and multiplied using the process of addition. Explain the meaning of “floating point number” and illustrate you answer with several examples. Describe the IEEE floating point definition.

68 – 01000100

112 – 01110000        

Adding and subtracting: 112 - 68 = 112 + (-68)

to find -68 in 2’s comp:

                invert 01000100 = 10111011

                                           1 + 1

                                   10111100 – 2’s compliment

Join now!

so 01110000 ( +112)

+  10111100 ( -68)

=  00101100 ( +44)

Multiplying: 112 * 68

                                        112           01110000

                                        68        01000100

        

112 * 4          (shift twice)                                       0111000000

112 * 64 (shift *6)                           ...

This is a preview of the whole essay