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

Computing AMS Assignment

The document contains exercises related to computing, including conversions between different number bases (denary, binary), arithmetic operations (addition, subtraction, multiplication, division), and conversions between decimal and binary numbers. It also discusses the differences between ASCII and Unicode character sets, and provides examples of converting decimal fractions to binary and vice versa. The final answers and calculations for each exercise are presented in detail.

Uploaded by

adeniranmayode
Copyright
© © All Rights Reserved
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)
3 views

Computing AMS Assignment

The document contains exercises related to computing, including conversions between different number bases (denary, binary), arithmetic operations (addition, subtraction, multiplication, division), and conversions between decimal and binary numbers. It also discusses the differences between ASCII and Unicode character sets, and provides examples of converting decimal fractions to binary and vice versa. The final answers and calculations for each exercise are presented in detail.

Uploaded by

adeniranmayode
Copyright
© © All Rights Reserved
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/ 14

NAME: EGHAREVBA JOHN OMOCLEMENT

MATRIC NO: 24/1650


COURSE: INTRODUCTION TO COMPUTING AMS
DEPARTMENT: ACCOUNTING
DATE : 27/ 12/ 24
LECTURER: MR ABEL
Exercise 1
- QUESTION 1: converting to denary

a. 112

112 = (1 x 21) + (1 x 20) = 2 + 1 = 3

Ans = 3

b. 123

123 = (1 x 31) + (2 x 30) = 3 + 2 =5

Ans = 5

c. 145

145 = (1 x 51) + (4 x 50) = 5 + 4 = 9

Ans = 9

d. 189

189 = (1 x 91) (8 x 90) = 9 + 8 = 17

Ans = 17

e. 1728

1728 = (1 x 82) + (7 x 81) + (2 x 80) = 64 +56 +2 = 122

Ans = 122

f. 101112

101112 = (1 x 24) +(0 x 23) + (1 x 22) +(1 x 21) +(1 x 20) = 16 + 0 + 4 + 2 + 1 =23

Ans = 23

g. 1116

1116= (1 x 161) + (1 x 160) = 16 + 1 =17


Ans = 17

- QUESTION 2: Addition of base

a. 110112 + 10112

110112

+ 10112

1001102

b. 1110112 + 11012 + 101112

1110112
+ 1101
+ 101112
10111112

c. 14356 + 15226 + 1326

14356
+ 15226
+ 1326
35336

-QUESTION 3: Converting to binary numbers

a. 3

2 3

2 1r1
2 0r1

Ans = 112

b. 11

2 11
2 5r1
2 2r1
2 1r0
2 0r1
Ans = 10112

c. 17

2 17

2 8r1
2 4r0
2 2r0
2 1r0
2 0r1

Ans =100012

d. 102

2 102
2 51r0
2 25r1
2 12r1
2 6r0
2 3r0
2 1r1
2 0r1

Ans =11001102

e. 63

2 63
2 31r1
2 15r1
2 7r1
2 3r1
2 1r1
2 0r1

Ans = 1111112
- QUESTION 3B: Subtraction of bases

a. 1110112 – 10112

1110112
- 10112
1100002

Ans =1100002

b. 31234 – 1334

31234
- 1334
22304

Ans = 22304

c. 1112 x 1012

1112
x 1012
111
000
111
100112

Ans = 100112

d. 111012 x 11012

111012
x 1101 2
11101
00000
11101
11101
1011110012

Ans = 1011110012
-QUESTION 4: Division of bases

a. 10000012 / 1012

1111

------

101 | 100001

101

------

111

101

------

10

 Quotient: 11112

 Remainder: 102

b. 110012 / 1012

101
------
101 | 11001
101
---------
110
101
---------
1
Quotient: 1012
Remainder: 12
c. 10000012 / 11012

110
---------
1101 | 100001
1101
---------
1110
1101
---------
QUESTION 5: Binary operations

a. 1 ÷ 5

1÷5=0.210

Convert 0.20.20.2 to binary: METHOD BINA

i. Multiply 0.2×2=0.4→ Integer part: 0

ii. Multiply 0.4×2=0.8→Integer part: 0

iii. Multiply 0.8×2=1.6→ Integer part: 1

iv. Multiply 0.6×2=1.2→ Integer part: 1

v. Multiply 0.2×2=0.4→Repeats

0.210=0.0011...2

Answer: 1÷5=0.00112

b. 1 ÷ 3
1÷3=0.333310

Convert 0.3333 to binary: METHOD BINA

i. Multiply 0.3333×2=0.66660→ Integer part: 0

ii. Multiply 0.6666×2=1.3332 → Integer part: 1


iii. Multiply 0.3332×2=0.6664 → Integer part: 0

iv. Multiply 0.6664×2=1.3328 → Integer part: 1


Repeats.

Binary representation:

0.333310=0.010101…2

Answer: 1÷3=0.01012

c. 5 ÷ 13

5÷13=0.38461510

Convert 0.384615 to binary: METHOD BINA

i. Multiply 0.384615×2=0.76923 → Integer part: 0

ii. Multiply 0.76923×2=1.53846 → Integer part: 1

iii. Multiply 0.53846×2=1.07692 → Integer part: 1

iv. Multiply 0.07692×2=0.15384 → Integer part: 0

v. Multiply 0.15384×2=0.30768 → Integer part: 0


Repeats.

Binary representation:

0.38461510=0.011001...2

Answer: 5÷13=0.0110012

d. 7÷10

1÷7=0.14285710
Convert 0.142857 to binary: METHOD BINA
i. Multiply 0.142857×2=0.285714 → Integer part: 0
ii. Multiply 0.285714×2=0.571428 → Integer part: 0
iii. Multiply 0.571428×2=1.142856 → Integer part: 1
iv. Multiply 0.142856×2=0.285712 → Integer part: 0
Repeats.
Binary representation:
0.14285710=0.001001…2
Answer: 1÷7=0.0010012

e. 5 ÷ 10

5÷10=0.510
Convert 0.5 to binary: METHOD BINA
1. Multiply 0.5×2=1.0 → Integer part: 1.
Binary representation ends.
0.510=0.12
Answer: 5÷10=0.12

Final Answers
1. 1÷5=0.00112
2. 1÷3=0.01012
3. 5÷13=0.0110012
4. 1÷7=0.0010012
5. 5÷10=0.12

QUESTION 6: Converting to decimal fraction

a. 0.110112

0.110112 = (1 × 2-1) + (1 × 2-2) + (0 × 2-3) + (1 × 2-4) + (1 × 2-5)


= 0.5 + 0.25 + 0.0625 + 0.03125
= 0.8437510
0.110112 = 0.8437510

b. 0.1011012

0.1011012 = (1 x 2-1) + (0 x 2-2) + (1 x 2-3) + (1 x 2-4) + (0 x 2-5) + (1 x 2-6)


= 0.5 + 0 + 0.125 + 0.0625 + 0 + 0.015625
= 0.703125
0.1011012 = 0.70312510

c. 0.1102

0.1102 = (1 x 2-1) + (1 x 2-2) + (0 x 2-3)


= 0.5 + 0.25
=0.75
0.1102 = 0.7510

d. 0.112

0.112 = (1 x 2-1) + (1 x 2-2)


= 0.5 + 0.25
= 0.75
0.112 = 0.7510

e. 0.11012

0.11012 = (1 x 2-1) + (1 x 2-2) + (0 x 2-3) + (1 x 2-4)

= 0.5 + 0.25 + 0 + 0.0625

= 0.8125

0.11012 = 0.812510

f. 0.101112

0.101112 = (1x 2-1) + (0 x 2-2) + (1 x 2-3) + (1 x 2-4) + (1 x 2-5)


= 0.5 + 0.125 + 0.0625 + 0.03125
=0.71875
0.101112 = 0.7187510

g. 0.112
0.112 = (1 x 2-1) + (1 x 2-2)
= 0.5 + 0.25
= 0.75
0.112 = 0.7510

h. 0.1112
0.1112 = (1 x 2-1) + (1 x 2-2) + (1 x 2-3)
= 0.5 + 0.25 + 0.125
=0.875
0.1112 = 0.87510

i. 0.1012
0.1012 = (1 x 2-1) + (0 x 2-2) + (1 x 2-3)
= 0.5 + 0.125
=0.625
0.1012 = 0.62510

j. 0.10012

0.10012 = (1 x 2-1) + (0 x 2-2) + (0 x 2-3) + (1 x 2-4)

=0.5 + 0.0625
= 0.5625
0.10012 = 0.562510

EXERCISE 2
-QUESTION 1: Differences between ASCII and Unicode character sets?
ASCII (American Standards Code for Information Interchange) and is a character encoding
standard that’s allows computers to represent text. ASCII assigns a unique numeric value to
each character, such as a letter, number, symbol, or control character. These values are then
stored in the computer using binary code, which is made up of 1s and 0s. It was developed in
1963 by the American National Standards Institute to allow different computers to
communicate with each other. Before ASCII, each computer company used its own binary
system, so the code for the same letters could differ between brands. While Unicode character
sets is a character encoding standard that assigns a unique numeric value to every character,
regardless of the language, program, or platform. This allows computers to represent and
manipulate text from different writing systems, including alphabets, ideographs, and symbols.
Unicode is a superset of all other character sets that have been encoded. It’s used by many
products and standards, including: XML, HTML, JScript, Java, Perl, Rust, and c#.

QUESTION 2: Converting decimal to binary number


- Converting (39.6875)10 to binary
- We need to separate both as a whole number and its fractional part
Step 1:
3910 to binary

2 39
2 19r
1
2 9r1
2 4r1
2 2r0
2 1r0
2 0r1

= 1001112
Step 2:

i. Multiply the fractions by 2.


ii. The integer part of the result is the next binary digit.
iii. Repeat with the new fractional part until it becomes 0

0.687510 to binary
- 0.6875 × 2 = 1.375 (integer part is 1)
- 0.375 × 2 = 0.75 (integer part is 0)
- 0.75 × 2 = 1.5 (integer part is 1)
- 0.5 × 2 = 1.0 (integer part is 1)
Now, combining the integer parts, we get: 1011.

Adding both the fractional s


1001112 110112 = 100111.1011
Therefore, the binary form of 39.687510 is 100111.10112

QUESTION 3: Converting binary to decimal number


- Converting (010101.101001)2 to decimal
- We need to separate both fractional’ s
Step1:
0101012 = (0 x 25) + (1 x 24) + (0 x 23) + (1 x 22) + (0 x 21) + (1 x 20)
= 16 + 4 + 1
= 2110
Step 2:
1010012 = (1 x 2-1) + (0 x 2-2) + (1 x 2-3) + (0 x 2-4) + (0 x 2-5) + (1 x 2-6)
= 0.5 + 0.125 + 0.015625
= 0.640625
Adding both the whole number and the fractional part
21(whole number) 0.640625(fraction part) = 21.640625
Therefore, the decimal number for 010101.1010012 is 21.640625

QUESTION 4: A bit-sequence is a what?


Ans = (B) Word
QUESTION 5: A byte can represent what pieces of information?
Ans = (A) 256
QUESTION 7: Convert hexadecimal number A to decimal
Ans = (B) 10
QUESTION 8: Addition of binary
11002
+ 10102
101102

Ans = 101102

QUESTION 9: Binary fractions

3
a. 7 in binary:

3 in binary: 112
7 in binary:1112
METHOD BINA
Dividing 3÷7 in binary gives approximately:
3
7
=0.010101…2

4
b. 10 in binary:

4 in binary: 1002
10 in binary: 10102
METHOD BINA

Dividing 4÷10 in binary gives approximately:


4
10
= 0.0110011...2

5
c. 13 in binary:
5 in binary: 1012
13 in binary: 11012
METHOD BINA

Dividing 5÷13 in binary gives approximately:


5
13
=0.01010011...2

QUESTION 10: Subtracting of binary

a. 11112 - 10112
11112
- 10112
1002
Ans = 01002

b. 10102 – 11002

10102
- 11002
-01102
Ans = -01102

c. 110102 - 010112

110102
- 010112
11112
Ans = 011112

You might also like