Last active
March 20, 2020 07:12
-
-
Save vd89/83b19e60c61c408c97a84455eeb19578 to your computer and use it in GitHub Desktop.
The Number System from BootCamp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Question and answer for the problem set | |
1. What is the Decimal equivalent of (11110000101010101)2 | |
Ans. 1 * 2^16 = 65536 | |
1 * 2^15 = 32768 | |
1 * 2^14 = 16384 | |
1 * 2^13 = 8192 | |
0 * 2^12 = 0 | |
0 * 2^11 = 0 | |
0 * 2^10 = 0 | |
0 * 2^9 = 0 | |
1 * 2^8 = 256 | |
0 * 2^7 = 0 | |
1 * 2^6 = 64 | |
0 * 2^5 = 0 | |
1 * 2^4 = 16 | |
0 * 2^3 = 0 | |
1 * 2^2 = 4 | |
0 * 2^1 = 0 | |
1 * 2^0 = 1 | |
sum = (1+4+16+64+256+8192+16384+32768+65536) | |
Decimal = (123221)10 | |
2.What is the Hexadecimal equivalent of (98899910)10 | |
Ans. | |
98989910 | |
6186869 6 | |
386679 5 | |
24167 7 | |
1510 7 | |
94 6 | |
5 14 | |
Hexadecimal => (5E67756)16 | |
Hexadecimal | |
0-9 | |
10 - A | |
11 - B | |
12 - C | |
13 - D | |
14 - E | |
15 - F | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6.Convert the following floating numbers | |
1) (34.34) 10 | |
2) (125.125) 10 | |
3) (10.16) 10 | |
to binary, base 3, octal, and hexadecimal. Any fractions | |
that do not terminate should be truncated to 4 digits in | |
the fractional part. | |
1) (34.34)10 | |
2/ 34 Exponent | |
17 0 | |
8 1 | |
4 0 | |
2 0 | |
1 0 | |
0.34 Mantissa | |
0.34 * 2 = 0.68 | |
0.68 * 2 = 1.36 | |
0.38 * 2 = 0.72 | |
0.72 * 2 = 1.44 | |
0.44 * 2 = 0.88 | |
0.88 ---- | |
(34.34)10 = (100010.01010)2 | |
3/ 34 | |
11 1 | |
3 2 | |
1 0 | |
0.34 * 3 = 1.02 | |
0.02 * 3 = 0.06 | |
0.06 * 3 = 0.18 | |
0.18 * 3 = 0.54 | |
0.54 * 3 = 1.62 | |
0.62 * 3 = 1.85 | |
0.85 * 3 = 2.55 | |
0.55 * 3 = 1.65 | |
0.65 * 3 = ---- | |
(34.34)10 = ( 1021.10001121)3 | |
8/ 34 | |
4 2 | |
0.34 * 8 = 2.72 | |
0.72 * 8 = 5.76 | |
0.76 * 8 = 6.08 | |
0.08 * 8 = 0.64 | |
0.64 * 8 = 5.12 | |
0.12 * 8 = 0.96 | |
0.96 * 8 = 7.68 | |
0.68 * 8 = 5.44 | |
(34.34)10 = (42.25605075) | |
16/ 34 | |
2 2 | |
0.34 * 16 = 5.44 | |
0.44 * 16 = 7.04 | |
0.04 * 16 = 0.64 | |
0.64 * 16 = 10.24 | |
0.24 * 16 = 3.84 | |
0.84 * 16 = 13.44 | |
0.44 * 16 = 7.04 | |
(34.34)10 = (22.570A3D7) | |
2) (125.125)10 | |
2/ 125 | |
62 1 | |
31 0 | |
15 1 | |
7 1 | |
3 1 | |
1 1 | |
0.125 * 2 = 0.25 | |
0.25 * 2 = 0.50 | |
0.50 * 2 = 1.0 | |
0 --- | |
(125.125)10 = (1111 101.001)2 | |
3/ 125 | |
41 2 | |
13 2 | |
4 1 | |
1 1 | |
0.125 * 3 = 0.375 | |
0.375 * 3 = 1.125 | |
0.125 * 3 = 0.375 | |
0.375 * 3 = 1.125 | |
---- | |
(125.125)10 = (11122.0101)3 | |
8/ 125 | |
15 5 | |
1 7 | |
0.125 * 8 = 1.000 | |
000--- | |
(125.125)10 = (175.10)8 | |
16/ 125 | |
7 13 D | |
0.125 * 16 = 2.0 | |
0.000 | |
(125.125)10 = (7D.20)16 | |
3) (10.16) 10 | |
2/ 10 | |
5 0 | |
2 1 | |
1 0 | |
0.16 * 2 = 0.32 | |
0.32 * 2 = 0.64 | |
0.64 * 2 = 1.28 | |
0.28 * 2 = 0.56 | |
0.56 * 2 = 1.12 | |
0.12 * 2 = 0.24 | |
0.24 * 2 = 0.48 | |
0.48 * 2 = 0.96 | |
0.96 * 2 = 1.92 | |
---- | |
(10.16)10 = (1010.001010001)2 | |
3/ 10 | |
3 1 | |
1 0 | |
0.16 * 3 = 0.48 | |
0.48 * 3 = 1.44 | |
0.44 * 3 = 1.32 | |
0.32 * 3 = 0.96 | |
0.96 * 3 = 2.88 | |
0.88 * 3 = 2.64 | |
0.64 * 3 = 1.92 | |
(10.16)10 = (101.0110221)3 | |
8/ 10 | |
1 2 | |
0.16 * 8 = 1.28 | |
0.28 * 8 = 2.24 | |
0.24 * 8 = 1.92 | |
0.92 * 8 = 7.36 | |
0.36 * 8 = 3.24 | |
0.24 * 8 = 1.92 | |
(10.16)10 = (12.121731)8 | |
16/ 10 | |
0.16 * 16 = 2.56 | |
0.56 * 16 = 8.96 | |
0.96 * 16 = 15.36 | |
0.36 * 16 = 5.76 | |
0.76 * 16 = 12.16 | |
0.16 * 16 = 2.56 | |
(10.16)10 = (A.28F5C2)16 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5.Convert the following base 10 numbers to the base indicated: | |
A. (5610) 10 => ( ) 2 | |
B. (5610)10 => ( ) 3 | |
C. (5610) 10 => ( ) 8 | |
D. (5610) 10 => ( ) 12 | |
E. (5610) 10 => ( ) 16 | |
F. (22110) 10 => ( ) 2 | |
G. (22110) 10 => ( ) 3 | |
H. (22110) 10 => ( ) 8 | |
I. (22110) 10 => ( ) 12 | |
J. (22110) 10 => ( ) 16 | |
A. (5610) 10 => ( ) 2 | |
2/ 5610 | |
2805 0 | |
1402 1 | |
701 0 | |
350 1 | |
175 0 | |
87 1 | |
43 1 | |
21 1 | |
10 1 | |
5 0 | |
2 1 | |
1 0 | |
(5610)10 = (1010 1111 0101 0)2 | |
B. (5610)10 => ( ) 3 | |
3/ 5610 | |
1870 0 | |
623 1 | |
207 2 | |
69 0 | |
23 0 | |
7 2 | |
2 1 | |
(5610)10 = (21200210)3 | |
C. (5610)10 => ( )8 | |
8/ 5610 | |
701 2 | |
87 5 | |
10 7 | |
1 2 | |
(5610)10 = (12752)8 | |
D. (5610) 10 => ( ) 12 | |
12/ 5610 | |
467 6 | |
38 11 | |
3 2 | |
(5610)10 = )32B6 | |
E. (5610) 10 => ( )16 | |
16/ 5610 | |
350 10 A | |
21 14 E | |
1 5 | |
(5610)10 = (15EA)16 | |
F. (22110) 10 => ( )2 | |
2/ 22110 | |
11055 0 | |
5527 1 | |
2763 1 | |
1381 1 | |
690 1 | |
345 0 | |
172 1 | |
86 0 | |
43 0 | |
21 1 | |
10 1 | |
5 0 | |
2 1 | |
1 0 | |
(22110)10 = (1010 1100 1011 110)2 | |
G. (22110) 10 => ( ) 3 | |
3/ 22110 | |
7370 0 | |
2456 2 | |
818 2 | |
272 2 | |
90 2 | |
30 0 | |
10 0 | |
3 1 | |
1 0 | |
(22110)10 = (1010 0222 20)3 | |
H. (22110) 10 => ( ) 8 | |
8/ 22110 | |
2763 6 | |
345 3 | |
43 1 | |
5 3 | |
(22110)10 = (53136) | |
I. (22110) 10 => ( ) 12 | |
12/ 22110 | |
1842 6 | |
153 6 | |
12 9 | |
1 0 | |
(22110)10 = (10966)12 | |
J. (22110) 10 => ( ) 16 | |
16/ 22110 | |
1381 14 E | |
86 5 | |
5 6 | |
(22110)10 = (565E) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4.Convert the following numbers to the base 10 : | |
A. (3312)8 | |
B. (167)8 | |
C. (202103)9 | |
D. (3132334)16 | |
E. (0xF2)16 | |
A. (3312)8 | |
3 * 8^3 = 1536 | |
3 * 8^2 = 192 | |
1 * 8^1 = 8 | |
2 * 8^0 = 2 | |
1536+192+8+2 = (1738)10 | |
(3312)8 == (1738)10 | |
B. (167)8 | |
1 * 8^2 = 64 | |
6 * 8^1 = 48 | |
7 * 8^0 = 7 | |
64+48+7 =(119)10 | |
(167)8 = (119)10 | |
C. (202103)9 | |
2 * 9^5 = 118098 | |
0 * 9^4 = 0 | |
2 * 9^3 = 1458 | |
1 * 9^2 = 81 | |
0 * 9^1 = 0 | |
3 * 9^0 = 3 | |
118098+1458+81+3 =(119640)10 | |
(202103)9 = (119640)10 | |
D. (3132334)16 | |
3 * 16^6 = 50331648 | |
1 * 16^5 = 1048576 | |
3 * 16^4 = 196608 | |
2 * 16^3 = 8192 | |
3 * 16^2 = 768 | |
3 * 16^1 = 48 | |
4 * 16^0 = 4 | |
50331648+1048576+196608+8192+768+48+4 = (51585844)10 | |
(3132334)16 = (51585844)10 | |
E. (0xF2)16 | |
F * 16^1 = 240 | |
2 * 16^0 = 2 | |
240+2 = (242)10 | |
(0xF2)16 =(242)10 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3.Convert the following numbers to base indicated and | |
vice-versa (Cross-Verify) | |
A. (1101)2 => ( )8 | |
B. (1111 1111 1110)2 => ( )10 | |
C. (221201)3 => ( )10 | |
D. (76)8 => ( )10 | |
E. (231)8 => ( )2 | |
F. (0xF00)16 => ( )8 | |
G. (0xDACE)16 => ( )12 | |
H. (0x2B)16 =>( )8 | |
A. (1101)2 => ( )8 | |
1 * 2^3 = 8 | |
1 * 2^2 = 4 | |
0 * 2^1 = 0 | |
1 * 2^0 = 1 | |
(1101)2 = (13)10 | |
13 | |
13/8 1 5 | |
(1101)2 == (13)10 == (15)8 | |
B. (1111 1111 1110)2 => ( )10 | |
1 * 2^11 = 2048 | |
1 * 2^10 = 1024 | |
1 * 2^9 = 512 | |
1 * 2^8 = 256 | |
1 * 2^7 = 128 | |
1 * 2^6 = 64 | |
1 * 2^5 = 32 | |
1 * 2^4 = 16 | |
1 * 2^3 = 8 | |
1 * 2^2 = 4 | |
1 * 2^1 = 2 | |
0 * 2^0 = 0 | |
2+4+8+16+32+64+128+256+512+1024+2048 = (4094)10 | |
(1111 1111 1110)2 => (4094)10 | |
C. (221201)3 => ( )10 | |
2 * 3^5 = 486 | |
2 * 3^4 = 162 | |
1 * 3^3 = 27 | |
2 * 3^2 = 9 | |
0 * 3^1 = 0 | |
1 * 3^0 = 1 | |
1+9+27+162+486 = (685)10 | |
(221201)3 => (685)10 | |
D. (76)8 => ( )10 | |
7 * 8^1 = 56 | |
6 * 8^0 = 6 | |
56+6 = (62)10 | |
(76)8 => (62)10 | |
E. (231)8 => ( )2 | |
2 * 8^2 = 128 | |
3 * 8^1 = 24 | |
1 * 8^0 = 1 | |
1+24+128 = (153)10 | |
153 | |
76 1 | |
38 0 | |
19 0 | |
9 1 | |
4 1 | |
2 0 | |
1 0 | |
(153)10 => (10011001)2 | |
(231)8 => (10011001)2 | |
F. (0xF00)16 => ( )8 | |
F * 16^2 = 15 * 16^2 = 3840 | |
0 * 16^1 = 0 | |
0 * 16^0 = 0 | |
(0xF00)16 = (3840)10 | |
8/ 3840 | |
480 0 | |
60 0 | |
7 4 | |
(3840)10 = (7400)8 | |
G. (0xDACE)16 => ( )12 | |
D * 16^3 = 13 * 16^3 = 53248 | |
A * 16^2 = 10 * 16^2 = 2560 | |
C * 16^1 = 12 * 16^1 = 192 | |
E * 16^0 = 14 | |
(0xDACE)16 = (56014)10 | |
12/ 56014 | |
4667 10 | |
388 11 | |
32 4 | |
2 8 | |
(AB482)12 | |
(0xDACE)16 => (AB482)12 | |
H. (0x2B)16 =>( )8 | |
2 * 16^1 = 32 | |
B * 16^0 = 11 | |
(2B)16 = (43)10 | |
8/ 43 | |
5 3 | |
(0x2B)16 = (53)8 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment