In: Computer Science
1. Suppose an average page of a Unicode text document holds roughly 1500 characters. Using appropriate units of measure, estimate how many such pages a CD storage media with 600 MB capacity can store. Show your work.
2. Perform the following using 10-bit floating-point notation having the format SEEEMMMMMM: (A) Decode 1101110110 to decimal integer and/or fraction. (B) Decode 0001100000 to decimal integer and/or fraction. (C) Encode -5/32 (D) Encode: +6 and 5/8
3. Please read carefully. Using the minimum number of digits in 2’s complement notation, perform 25 – 18 (subtraction by preserving addition). Show all the significant steps in your work by indicating the starting values, sign conversion, and the addition operation aligning all numbers, including the carry values in each position using the Courier New font. Indicate the final value as decimal.
4. How many bits are required to represent all the elements currently in the Periodic Table? Explain.
1.
By using UTF ecoding mechanism in which each character takes 1 byte size.
So, One page would take 1500 byte size.
We have a CD, whose storage capacity is = 600MB = 600000000 Bytes.
Total pages, we can store = 600000000/1500 = 400000 pages
2.
(A) -0.017578125
(B) 1
(D) 0.110000000 | 000010
sign=0(positive)
mantissa=0.110000000
exponent=000010
3.
to represent 25, or -18 we need 6 bits. so, using 6 bits for calculations.. Number: 25 Let's convert this to two's complement binary 25 Since this is a positive number. we can directly convert this into binary Divide 25 successively by 2 until the quotient is 0 > 25/2 = 12, remainder is 1 > 12/2 = 6, remainder is 0 > 6/2 = 3, remainder is 0 > 3/2 = 1, remainder is 1 > 1/2 = 0, remainder is 1 Read remainders from the bottom to top as 11001 So, 25 of decimal is 11001 in binary so, 25 in 2's complement binary is 011001 Number: -18 Let's convert this to two's complement binary -18 This is negative. so, follow these steps to convert this into a 2's complement binary Step 1: Divide 18 successively by 2 until the quotient is 0 > 18/2 = 9, remainder is 0 > 9/2 = 4, remainder is 1 > 4/2 = 2, remainder is 0 > 2/2 = 1, remainder is 0 > 1/2 = 0, remainder is 1 Read remainders from the bottom to top as 10010 So, 18 of decimal is 10010 in binary So, 18 in normal binary is 010010 Step 2: flip all the bits. Flip all 0's to 1 and all 1's to 0. 010010 is flipped to 101101 Step 3:. Add 1 to above result 101101 + 1 = 101110 so, -18 in 2's complement binary is 101110 Adding 011001 and 101110 in binary (c)1110000 <- these are carry bits for the calculation. 011001 101110 ----------- (1)000111 ----------- Sum produces a carry of 1. We can ignore that carry. So, sum of these numbers in binary is 000111 Verification: --------------- sum = 000111 since left most bit is 0, this number is positive so, we can directly convert this into a decimal value Converting 111 to decimal 111 => 1x2^2+1x2^1+1x2^0 => 1x4+1x2+1x1 => 4+2+1 => 7 Answer: 7 This is correct since we can verify that 25+-18 = 7 So, there was no overflow.
4. 7
Explanation:- There are currently 118 elements in the periodic table. n bits can represent maximum value of (2^n) -1. So, maximum value can be represent by 7 bits is (2^7)-1= 128-1= 127.