0% found this document useful (0 votes)
25 views2 pages

CSA Task1

To summarize: 1) The document shows an example of performing two's complement addition of decimal numbers -50 and -120, which equals -170. It converts the numbers to binary, takes their one's complements, and adds them to get the sum. 2) It also gives an example of converting the octal number 23708 to decimal by determining the place value of each digit and summing the products. This yields 127210 as the decimal equivalent.

Uploaded by

Wong Sook Mun
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views2 pages

CSA Task1

To summarize: 1) The document shows an example of performing two's complement addition of decimal numbers -50 and -120, which equals -170. It converts the numbers to binary, takes their one's complements, and adds them to get the sum. 2) It also gives an example of converting the octal number 23708 to decimal by determining the place value of each digit and summing the products. This yields 127210 as the decimal equivalent.

Uploaded by

Wong Sook Mun
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

a) Arithmetic computation

Twos complement
Example:
-50 + (-120)

1. Convert decimal format into binary format:


5010 = 001100102
12010=011110002
2. Ones complement

-50:

11001101
+

Twos complement

-120:

11001110

3. Perform addition:

11001110

-28 + 26 + 24+22+21

+ 10001000

= -256 + 64 + 16 + 4 + 2

(1)01010110

= -170

Prove:
-50 + (-120) = -170
Therefore, the answer is valid.

10000111
+

10001000

b) Arithmetic conversion
Conversion from base-8 to base 10
Example:

Convert the following octal number into decimal number:


i)

23708

Power

multiplication
Sum for

83

82

81

80

512

64

X2

X3

X7

X0

1024

192

56

base 10

23708 = 127210
Prove:
2 1272
2 159

---0

2 19 ---7
2

---3

127210 = 23708
Therefore, the answer is valid.

1272

You might also like