Computing AMS Assignment
Computing AMS Assignment
a. 112
Ans = 3
b. 123
Ans = 5
c. 145
Ans = 9
d. 189
Ans = 17
e. 1728
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
a. 110112 + 10112
110112
+ 10112
1001102
1110112
+ 1101
+ 101112
10111112
14356
+ 15226
+ 1326
35336
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
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
Binary representation:
0.333310=0.010101…2
Answer: 1÷3=0.01012
c. 5 ÷ 13
5÷13=0.38461510
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
a. 0.110112
b. 0.1011012
c. 0.1102
d. 0.112
e. 0.11012
= 0.8125
0.11012 = 0.812510
f. 0.101112
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.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#.
2 39
2 19r
1
2 9r1
2 4r1
2 2r0
2 1r0
2 0r1
= 1001112
Step 2:
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.
Ans = 101102
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
5
c. 13 in binary:
5 in binary: 1012
13 in binary: 11012
METHOD BINA
a. 11112 - 10112
11112
- 10112
1002
Ans = 01002
b. 10102 – 11002
10102
- 11002
-01102
Ans = -01102
c. 110102 - 010112
110102
- 010112
11112
Ans = 011112