Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Q.1 What is the minimum number of bits needed to represent each of the following

ID: 3799566 • Letter: Q

Question

Q.1 What is the minimum number of bits needed to represent each of the following unsigned decimal integers? (20 points) • 69 • 254 • 1022 • 1999

Q.2 What is the minimum number of bits needed to represent each of the following signed decimal integers? (20 points) • 75 • 154 • 201 • 1000

Q.3 What is the 8-bit binary (two's-complement representation of each of the following signed decimal integers? (20 points) • -10 • -37 • -63 • -19

Q.4 What is an Integrated circuit? (20 points)

Q.5 Explain the principle of equivalent hardware and software? (20 points)

show all work plz thx

Explanation / Answer

Q.1:
Binary numbers are expressed in 2^n form.

2^12 2^11 2^10 2^9 2^8 2^7 2^6 2^5 2^4 2^3 2^2 2^1 2^0
=====================================================
4096 2048 1024 512 256 128 64 32 16 8 4 2 1

Now if we want to convert 69 to binary first we need to break 69 in form of addition of 2^x
To do that,we need to find the biggest decimal number in above table which is less than 69
Well, that is 64. So we now left with (69 - 64) = 5
Again, we have to find biggest decimal number in above table which is less than 5
The answer is 4
We are left with (5 - 4) = 1
Now we are a position to recombine all.
So, we need 64 + 4 + 1 = 2^6 + 2^2 + 2^0
Now, in below table we put 1 for 2^6, 2^2, 2^0 and 0 for rest

2^12 2^11 2^10 2^9 2^8 2^7 2^6 2^5 2^4 2^3 2^2 2^1 2^0
=====================================================
4096 2048 1024 512 256 128 64 32 16 8 4 2 1
=====================================================
1 0 0 0 1 0 1
So the binary representation of 69 is 1000101
I.e minimum bit required to express 69 is 7


One more easy way to find the minimum bit is to find what is the lowest decimal number present in above table which is greater than the given number. We will use this method to find the minimum number of bits needed to represent 254
So, from the above table we can see that the lowest number in table is 256 which is greater than 254
Now, 256 = 2^8
So, minimum 8 bit is required to express 254

Similarly,
1024 is the lowest decimal number present in above table which is greater than 1022
Now, 1024 = 2^10
So, minimum 10 bit is required to express 1022

Again,
2048 is the lowest decimal number present in above table which is greater than 1999
Now, 2048 = 2^11
So, minimum 11 bit is required to express 1022

Q.2:
128 is the lowest decimal number present in above table which is greater than 75
Now, 128 = 2^7
When 75 is a signed number 1 addition bit is required to express sign.
So, minimum 7 + 1 = 8 bit is required to express 75

256 is the lowest decimal number present in above table which is greater than 154
Now, 256 = 2^8
When 154 is a signed number 1 addition bit is required to express sign.
So, minimum 8 + 1 = 9 bit is required to express 154

256 is the lowest decimal number present in above table which is greater than 201
Now, 256 = 2^8
When 201 is a signed number 1 addition bit is required to express sign.
So, minimum 8 + 1 = 9 bit is required to express 201

1024 is the lowest decimal number present in above table which is greater than 1000
Now, 1024 = 2^10
When 1000 is a signed number 1 addition bit is required to express sign.
So, minimum 10 + 1 = 11 bit is required to express 1000

Q.3:
To calculate the 2's complement first we take the binary representation of the given decimal then flip all digits then add 1
10 => 8 + 2 => 2^3 + 2^1 => 1010 => 00001010 (Padding with predeceasing 0 to make the number 8 bit)
Now flip the digits,
00001010 => 11110101 (After flipping)
Now add 1
11110101 + 1 = 11110110
So, the 8 bit representation of -10 is 11110110

37 => 32 + 4 + 1 => 2^5 + 2^2 + 2^0 => 100101 => 00100101 (Padding with predeceasing 0 to make the number 8 bit)
Now flip the digits,
00100101 => 11011010 (After flipping)
Now add 1
11011010 + 1 = 11011011
So, the 8 bit representation of -37 is 11011011

63 => 32 + 16 + 8 + 4 + 2 + 1 => 2^5 + 2^ 4 + 2^3 + 2^2 + 2^1 + 2^0 => 111111 => 00111111 (Padding with predeceasing 0 to make the number 8 bit)
Now flip the digits,
00111111 => 11000000 (After flipping)
Now add 1
11000000 + 1 = 11000001
So, the 8 bit representation of -63 is 11000001

19 => 16 + 2 + 1 => 2^ 4 + 2^1 + 2^0 => 10011 => 00010011 (Padding with predeceasing 0 to make the number 8 bit)
Now flip the digits,
00010011 => 11101100 (After flipping)
Now add 1
11011010 + 1 = 11101101
So, the 8 bit representation of -19 is 11101101