Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 22

PRINCIPLES OF COMPUTER AND

COMPOSITION

Course Information

Dr. Yiju Wang


School of Aerospace and Engineering, Xiamen University
wangyiju@xmu.edu.my
Office: A1-425
CHAPTER 1

DATA REPRESENTATION AND MANIPULATION


Tutorial/Lab
3

 1. Convert the following binary numbers to their


decimal equivalents(Solve the problem manually
and check the your result with a language C
program.):
 a. 01100
 b. 0010011
 c. 01011101
 d. 11111001
 e. 1010110
Tutorial/Lab
4

 2 Convert the following decimal numbers to their


binary equivalents(Solve the problem manually
and check the your result with a language C
program.):
 a. 64
 b. 100
 c. 111
 d. 145
 e. 255
Tutorial/Lab
5

 3 Express the following octal numbers in


hexadecimal notation(Solve the problem manually
and check the your result with a language C
program.):
 a. 12
 b. 5655
 c. 2550276
 d. 76545336
 e. 3726755
Tutorial/Lab
6

 4 Convert the following hexadecimal numbers to


their decimal equivalents(Solve the problem
manually and check the your result with a
language C program.):
 a. C
 b. 9F
 c. D52
 d. 67E
 E. ABCD
Tutorial/Lab
7

 5 Convert the following decimal numbers to their


hexadecimal equivalents(Solve the problem
manually and check the your result with a
language C program.):
 a. 16
 b. 80
 c. 2560
 d. 3000
 e. 62500
Tutorial/Lab
8

 6. Convert the following hexadecimal numbers to


their binary equivalents (Solve the problem
manually.):
 a. E
 b. 1C
 c. A64
Tutorial/Lab
9

 7. What is your computer wordsize? What is the


meaning of the computer wordsize?
Tutorial/Lab
10

 8. What is your computer main memeory


size/capacity? How many bytes does it has?
Tutorial/Lab
11

 9. What is bit, byte, word and double word?


Tutorial/Lab
12

 10. What is 1K, 1M, 1G and 1T?


Tutorial/Lab
13

 11. Tell the data types of Language C?


Tutorial/Lab
14

 12. Tell how many bits it is for language C integer


with your computer?
Tutorial/Lab
15

 13. Please predict the address difference for a and


b in the following program, and check the result
with your computer.
Tutorial/Lab
16

 14. It is shown in the following figure that the


address of a and b are both 32-bit, why it is 32-bit?
Tutorial/Lab
17

 15. Please tell the size and range for different data
types of integer in language C with your
computer?
Tutorial/Lab
18

 16. Please tell the size and range for different data
types of character in language C with your
computer?
Tutorial/Lab
19

 17. Please tell the size and range for different data
types of float in language C with your computer?
Tutorial/Lab
20

 18. What is the difference between the ASCII code


of lower-case letter and upper-case letter? Write a
programming C language program to input an
lower-case letter and output its upper-case letter.
Tutorial/Lab
21

 19. It is shown in the following figure that the


address of b is less/lower than the address of a. Is
it possible that the address of b is more/higher
than the address of a?
Tutorial/Lab
22

 20. It is shown in the figure for 32-bit computer


the int data type size is 32-bit. Why its size still 32-
bit for 64-bit computer?

You might also like