0% found this document useful (0 votes)
7 views

csc303 Tutorial Sheet 1

Tutorial for computer architecture
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

csc303 Tutorial Sheet 1

Tutorial for computer architecture
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Department of Computer Science

First semester 2021_2022 academic year

CSC303 tutorial sheet on Data Representation

Exercises

Number Systems Conversion


1. Convert the following decimal numbers into binary and hexadecimal numbers:
a. 108
b. 4848
c. 9000
2. Convert the following binary numbers into hexadecimal and decimal numbers:
a. 1000011000
b. 10000000
c. 101010101010
3. Convert the following hexadecimal numbers into binary and decimal numbers:
a. ABCDE
b. 1234
c. 80F
4. Convert the following decimal numbers into binary equivalent:
a. 19.25D
b. 123.456D

Integer Representation
1. What are the ranges of 8-bit, 16-bit, 32-bit and 64-bit integer, in "unsigned" and "signed" representation?
2. Give the value of 88, 0, 1, 127, and 255 in 8-bit unsigned representation.
3. Give the value of +88, -88 , -1, 0, +1, -128, and +127 in 8-bit 2's complement signed representation.
4. Give the value of +88, -88 , -1, 0, +1, -127, and +127 in 8-bit sign-magnitude representation.
5. Give the value of +88, -88 , -1, 0, +1, -127 and +127 in 8-bit 1's complement representation.

Floating-point Numbers
1. Compute the largest and smallest positive numbers that can be represented in the 32-bit normalized form.
2. Compute the largest and smallest negative numbers can be represented in the 32-bit normalized form.
3. Repeat (1) for the 32-bit denormalized form.
4. Repeat (2) for the 32-bit denormalized form.

Exercises
For the following 16-bit codes:
0000 0000 0010 1010;
1000 0000 0010 1010;
Give their values, if they are representing:
1. a 16-bit unsigned integer;
2. a 16-bit signed integer;
3. two 8-bit unsigned integers;
4. two 8-bit signed integers;
5. a 16-bit Unicode characters;
6. two 8-bit ISO-8859-1 characters.

You might also like