In: Computer Science
3) Convert 1.25 decimal to 32 bit floating point format. 4) Convert the following truth table to a digital circuit consisting of NOT, AND, and OR gates. ABC Out 000 1 001 1 010 0 011 0 100 1 101 0 110 1 111 0 5) Construct a tri-state buffer using transistors
10) What are the advantages of a large page size?
Converting 1.25 to binary
Convert decimal part first, then the fractional part
> First convert 1 to binary
Divide 1 successively by 2 until the quotient is 0
> 1/2 = 0, remainder is 1
Read remainders from the bottom to top as 1
So, 1 of decimal is 1 in binary
> Now, Convert 0.25000000 to binary
> Multiply 0.25000000 with 2. Since 0.50000000 is < 1. then add 0 to result
> Multiply 0.50000000 with 2. Since 1.00000000 is >= 1. then add 1 to result
> This is equal to 1, so, stop calculating
0.25 of decimal is .01 in binary
so, 1.25 in binary is 1.01
1.25 in simple binary => 1.01
so, 1.25 in normal binary is 1.01 => 1.01 * 2^0
single precision:
--------------------
sign bit is 0(+ve)
exp bits are (127+0=127) => 01111111
Divide 127 successively by 2 until the quotient is 0
> 127/2 = 63, remainder is 1
> 63/2 = 31, remainder is 1
> 31/2 = 15, remainder is 1
> 15/2 = 7, remainder is 1
> 7/2 = 3, remainder is 1
> 3/2 = 1, remainder is 1
> 1/2 = 0, remainder is 1
Read remainders from the bottom to top as 1111111
So, 127 of decimal is 1111111 in binary
frac bits are 01000000000000000000000
so, 1.25 in single-precision format is 0 01111111 01000000000000000000000
in hexadecimal it is 0x3FA00000
