You are on page 1of 29

Computer

System
(CSC 1033)

Outcome 1:
Evaluate data
representation
and manipulation
within a
computer.
Tutorial 1
Computer Systems (CSC 1033)
Outcome 1: Evaluate data representation and manipulation within a computer

Parity Bit: ODD/EVEN

1) Encode the name ALI

i) In EBCDIC

ii) In ASCII

2) How would the binary code appear in the computer if the computer uses even parity
checking by using EBCDIC coding scheme.

3) Suppose that a computer uses an odd parity system in the EBCDIC coding scheme
and the ‘HAIQAL’ is sent to another computer as follows:

1 0100 1000 1 0100 0001 1 0100 1001 0 0101 0001 1 0100


0001 1 0100 1100

i) Without using a table; find which letters contain errors.

ii) Correct the errors.

2 |P a ge
Computer Systems (CSC 1033)
Outcome 1: Evaluate data representation and manipulation within a computer

Binary Conversion

1. Try converting these numbers from binary to decimal:

 10
 111
 10101
 11110

2. Binary --> Decimal


 1010100
 1010
 110011
 101111
 10001
 1111
 10000111

3. Convert the following binary numbers into decimal form.


(a) 10, (b) 101, (c) 111, (d) 110,
(e) 1011, (f) 1111, (g) 1001, (h) 1010.

4. Convert each of the following binary numbers into decimal numbers.


(a) 0.11, (b) 0.01, (c) 0.101, (d) 0.111,
(e) 1.011, (f) 1.111, (g) 1.001, (h) 10.101.

5. Which is the decimal form of the binary number 11.011?


(a) 3.17510, (b) 3.37510, (c) 4.17510, (d) 4.37510.

6. Decimal --> Binary


 5
 9
 19
 22
 31
 32
 46
 67

3 |P a ge
Computer Systems (CSC 1033)
Outcome 1: Evaluate data representation and manipulation within a computer

7. Which of the following is the binary form of 3010?


(a) 10111 (b) 10101, (c) 11011, (d) 11110.

4 |P a ge
Computer Systems (CSC 1033)
Outcome 1: Evaluate data representation and manipulation within a computer

Hexadecimal Conversion

Express the hexadecimal numbers of Exercises 10-15 in decimal notation.

10. E2 11. 987 12. FFF


13. A4 14. CDD3 15. 4E8

Express the hexadecimal numbers below in binary notation.

Convert 2000 from decimal to hexadecimal


Convert 3C from hexadecimal to decimal
Convert 1010 0111 1011 from binary to hexadecimal
Convert 7D0 from hexadecimal to binary

Convert the following decimal numbers to hexadecimals:

a) 160dec

b) 273dec

Convert the following hexadecimal numbers to decimal:

a) 5b2hex

b) ad23fhex

Convert the following hexadecimal numbers to binary:

a) ab5hex

b) 3fd8hex

Convert the following binary numbers to hexadecimal:

a) 011010010110100101bin

b) 1100111110010100110101bin

5 |P a ge
Computer Systems (CSC 1033)
Outcome 1: Evaluate data representation and manipulation within a computer

Number systems and conversions

1) Convert the binary number to decimal number:

a) 0111 b) 0010
c) 1011 d) 0110
e) 1110 e) 100010
f) 011110 g) 1111101000
h) 0000111111 i) 11001100
j) 1000 k) 11111111

2) Convert the decimal numbers to binary numbers

a) 64 b) 18
c) 69 d) 128
e) 25 f) 154
g) 32 h) 1001

3) Convert the hexadecimal numbers to binary number


a) 8A b) 6C
c) B7 d) FF

4) Convert the binary numbers to hexadecimal numbers


a) 01011110 b) 11011011
c) 00011111 d) 00110000

5) Convert each of binary to its hexadecimal form:


a) 1110011001101
b) 10001100011110

6) Convert each of the hexadecimal number to its octal form:


a) 1B4716
b) 87D3916

6 |P a ge
Computer Systems (CSC 1033)
Outcome 1: Evaluate data representation and manipulation within a computer

Binary Addition

Exercise 1:

111 101 111


+110 +111 +111
______ _____ _____

Exercise 2:

1. 101 + 11 =
2. 111 + 111 =
3. 1010 + 1010 =
4. 11101 + 1010 =
5. 11111 + 11111 =

Exercise 3:

a. 101 b. 111 c. 1010


+ 10 + 10 + 110
----- ----- -------

d. 1010 e. 1010 f. 1011


+1010 +1111 +101
--------- --------- -------

g. 1 1 1 1 0 h. 1 0 0 1 1 0 i. 1 0 1 1 1 0
+ 1110 + 1101 + 101
--------- ----------- -----------

Exercise 4:

(a) Convert the binary number 1011 into decimal form.


(b) Convert the binary number 1.011 into decimal form.
(c) Convert the numbers 15 and 12 into binary form, add the two
binary numbers together and convert the answer to decimal form
to check that the sum is correct.

7 |P a ge
Computer Systems (CSC 1033)
Outcome 1: Evaluate data representation and manipulation within a computer

Exercise 5:

In the questions below, two numbers are given in decimal


form. In each case, convert both numbers to binary form, add them
in binary form and check that the solution is correct by converting
the answer to decimal form.
(a) 3+3, (b) 7+3, (c) 4+2,
(d) 6+4, (e) 15+12, (f) 28+19

Exercise 6:

What is the result of adding together the three binary numbers


101, 110, 1011?
(a) 10110, (b) 11010, (c) 11001, (d) 11110.

Exercise 7:

Which of the following is the binary sum 1011 + 1101?


(a) 11010, (b) 11100, (c) 11000, (d) 10100.

8 |P a ge
Computer Systems (CSC 1033)
Outcome 1: Evaluate data representation and manipulation within a computer

Octal and Hexadecimal Addition

Exercise 1:Evaluate the following octal sums

a. 6254 + 4176
b. 36517 + 64753
c. 45376 + 36274
d. 2573654 + 444777

Exercise 2: Evaluate the following hexa sums

a. 82C5 + 9D86
b. 83A7F4 + B5B63
c. 47B6 + 9C75
d. 8D07A5 + 734F6

9 |P a ge
Computer Systems (CSC 1033)
Outcome 1: Evaluate data representation and manipulation within a computer

Binary Subtraction

110 - 10 =
101 - 11 =
1001 - 11 =
1101 - 11 =
110001 - 100 =

Convert the numbers 9 and 6 into binary form. Use this to find
9 - 6 in binary form. Check that the answer is correct by
converting the binary answer into decimal form.

In each of the questions below, a subtraction is written in decimal


form. In each case, convert both numbers to binary form, subtract
them in binary form and check that the solution is correct by converting
the answer to decimal form. (Click on the green letters for
solutions.)
(a) 3 - 1, (b) 3 - 2, (c) 4 - 2,
(d) 6 - 4, (e) 9 - 6, (f) 9 - 7.

Quiz Choose the correct answer from below for the result of the binary
subtraction 1101 - 111.
(a) 110, (b) 101, (c) 111, (d) 11.
4. Which of the following is the binary subtraction 1101 - 1011?
(a) 11, (b) 110, (c) 101, (d) 10.

10 | P a g e
Computer Systems (CSC 1033)
Outcome 1: Evaluate data representation and manipulation within a computer

Exercise 6
Subtract the following binary digits
a. 1001 - 11 =

b. 1101 - 11 =

c. 11.0112 - 10.1012 =

11 | P a g e
Computer Systems (CSC 1033)
Outcome 1: Evaluate data representation and manipulation within a computer

PASS YEAR EXAM: 2007

SECTION A

ANSWER ALL QUESTIONS (60 marks)

1. Based on given table encode the name one of a car “ VIVA” in EBCDIC and ASCII
codes. Exclude the symbol “””. (4 marks)

2. ABC computer uses an even parity system in the ASCII coding scheme to send the
“KIA” to another computer. Exclude the symbol “””. Correct the error.
(2 marks)

3. The based 8 system is sometimes called the ____________ number. (2 marks)

4. Decimal number is called ____________ system. (2 marks)

5. Add the following numbers.


a. 111012 + 10012 (4 marks)

b. 58C716 +AD8616 (4 marks)

c. 40078 + 1123778 (4 marks)

12 | P a g e
Computer Systems (CSC 1033)
Outcome 1: Evaluate data representation and manipulation within a computer

6. Subtract the following numbers.


a. 111012 -10112 (4 marks)

b. 72678 – 54368 (4 marks)

c. FA5116 - A7616 (4marks)

13 | P a g e
Computer Systems (CSC 1033)
Outcome 1: Evaluate data representation and manipulation within a computer

7. Convert the following decimal number to the equivalent of binary number


a. 202 (6 marks)

8. Convert the following hexadecimal number to decimal


a. B6C716 (6 marks)

9. Convert the following binary number to decimal


a. 10102 (6 marks)

10. Convert the following octal number to decimal


a. 24248 (6 marks)

14 | P a g e
Computer Systems (CSC 1033)
Outcome 1: Evaluate data representation and manipulation within a computer

SECTION B

ANSWER ALL QUESTIONS (40 marks)

1. Convert the following Floating Point for binary number to decimal


a. 1010.10102 (8 marks)

2. Convert the following decimal floating point number to 4 binary places


a. 3.202 (10 marks)

15 | P a g e
Computer Systems (CSC 1033)
Outcome 1: Evaluate data representation and manipulation within a computer

PASS YEAR EXAM: 2009

SECTION A

ANSWER ALL QUESTIONS (30 marks)

11. Based on given table encode the name one of Malaysian athlete “ MISBUN” in EBCDIC
and ASCII codes. (4 marks)

12. ABC computer uses an odd parity system in the ASCII coding scheme to send the
“MISBUN” to another computer. Correct the error. (4 marks)

13. The based 16 system is sometimes called the ____________ number. (2 marks)

14. Octal number is called ____________ system. (2 marks)

15. The decimal system is said to have a __________ of ___________ (2 marks)

16. In the binary system, we have only two digits, ________ and __________. Thus,
number in the binary system are represented to the base 2. (2 marks)

17. The number 4728 means in decimal system is: (4 marks)

18. A notation known as hexadecimal has been adopted. In hexadecimal system, binary
digits are grouped into sets of ____________. (2 marks)
19. In the hexadecimal system, we have ____________ hexadecimal digits. Thus, number
in the hexadecimal system are represented to the base 16. (2 marks)

16 | P a g e
Computer Systems (CSC 1033)
Outcome 1: Evaluate data representation and manipulation within a computer

20. Fill in the blank the possible combination of four binary digits is given a symbol
(hexadecimal digits) as follows: (6 marks)

0000 0 1000 8
0001 1 _____ 9
____ 2 1010 A
0011 3 1011 ______
0100 4 1100 C
0101 ______ 1101 D
0110 6 ______ E
0111 ______ 1111 F

17 | P a g e
Computer Systems (CSC 1033)
Outcome 1: Evaluate data representation and manipulation within a computer

SECTION B

ANSWER ALL QUESTIONS (30 marks)

3. Convert the following Floating Point for binary number to decimal


b. 10110.1001102 (5 marks)

c. 100001112 (3 marks)

2. Convert the following decimal number to the equivalent of binary number


a. 202 (by using new concept of calculation) (3 marks)

b. 47 (by using conventional concept of calculation) (2 marks)

18 | P a g e
Computer Systems (CSC 1033)
Outcome 1: Evaluate data representation and manipulation within a computer

3. Convert the following decimal number to the equivalent of octal number


a. 3298 (3 marks)

4. Convert the following hexadecimal number to decimal


a. A17716 (3 marks)

5. Convert the following binary number to octal by calculation.


a. 11001112 (3 marks)

19 | P a g e
Computer Systems (CSC 1033)
Outcome 1: Evaluate data representation and manipulation within a computer

6. Convert the following hexadecimal number to octal


a. 87D392 (5 marks)

7. Convert the following octal number to decimal 445578 (3 marks)

20 | P a g e
Computer Systems (CSC 1033)
Outcome 1: Evaluate data representation and manipulation within a computer

SECTION C

ANSWER ALL QUESTIONS (40 marks)

1. Add the following binary digits (6 marks)


a. 10102 + 10102 =

b. 11101 2 + 10102 =

c. 11.0112 + 10.1012 =

2. Subtract the following binary digits (6 marks)


d. 1001 - 11 =

e. 1101 - 11 =

f. 11.0112 - 10.1012 =

21 | P a g e
Computer Systems (CSC 1033)
Outcome 1: Evaluate data representation and manipulation within a computer

3. Evaluate the following octal digits (9 marks)


a. 453768 + 362748

b. 333.5768 + 47.47478

c. 62148 - 35278

4. Evaluate the following octal digits by using complements (5 marks)


a. 61578 – 43258 =

5. Evaluate the following hexadecimal digits (9 marks)


a. 82C516 + 9D8616 =

b. 4C.3E16 + 2.5D816 =

c. 74B6416 – 42AF116 =

22 | P a g e
Computer Systems (CSC 1033)
Outcome 1: Evaluate data representation and manipulation within a computer

6. Evaluate the following hexadecimal digits by using complements (5 marks)


a. 76B516 – 432C16

23 | P a g e
Computer Systems (CSC 1033)
Outcome 1: Evaluate data representation and manipulation within a computer

PASS YEAR EXAM: 2010

SECTION A

ANSWER ALL QUESTIONS (10 marks)

21. Based on given table encode the name one of Malaysian athlete “ZILAWATI” in EBCDIC
and ASCII codes. (4 marks)

22. HPC computer uses an EVEN parity system in the ASCII coding scheme to send the
“ZILAWATI” to another computer. Correct the error. (4 marks)

23. The number 17 means in decimal system is: (2 marks)

24 | P a g e
Computer Systems (CSC 1033)
Outcome 1: Evaluate data representation and manipulation within a computer

SECTION B

ANSWER ALL QUESTIONS (20 marks)

4. Convert the following Floating Point for binary number to decimal


d. 10110.1001102 (3 marks)

e. 11.0112 (3 marks)

8. Convert the following decimal number to the equivalent of binary number


a. 198 (by using new concept of calculation) (2 marks)

b. 67 (by using conventional concept of calculation) (2 marks)

25 | P a g e
Computer Systems (CSC 1033)
Outcome 1: Evaluate data representation and manipulation within a computer

9. Convert the following decimal number to the equivalent of octal number


a. 4028 (2 marks)

10. Convert the following hexadecimal number to decimal


a. BD1616 (2 marks)

11. Convert the following binary number to octal by calculation.


a. 11001112 (3 marks)

12. Convert the following hexadecimal number to octal


a. 87D392 (3 marks)

26 | P a g e
Computer Systems (CSC 1033)
Outcome 1: Evaluate data representation and manipulation within a computer

SECTION C

ANSWER ALL QUESTIONS (40 marks)

7. Add the following binary digits (4 marks)


a. 111012 + 10012 =

b. 11.0112 + 10.1012 =

8. Subtract the following binary digits (4 marks)


g. 1001 - 11 =

h. 11.0112 - 10.1012 =

9. Convert the following decimal numbers to binary and perform the arithmetic in 8-bits (4
marks)

a. 8810 - 7210

27 | P a g e
Computer Systems (CSC 1033)
Outcome 1: Evaluate data representation and manipulation within a computer

10. Evaluate the following octal digits (8 marks)


d. 365178 + 647538

e. 333.5768 + 47.47478

f. 62148 – 25728

g. 72678 – 54368

11. Evaluate the following octal digits by using complements (6 marks)


b. 61578 – 43258 =

28 | P a g e
Computer Systems (CSC 1033)
Outcome 1: Evaluate data representation and manipulation within a computer

12. Evaluate the following hexadecimal digits (8 marks)


e. 8D07A5 16 + 734F616 =

f. 4C.3E16 + 2.5D816 =

g. FA5116 - A7616 =

h. A7616 - B216=

13. Evaluate the following hexadecimal digits by using complements (6 marks)


b. 76B516 – 432C16

29 | P a g e