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

1. How many bits are required to represent each of the following sets of integer

ID: 3564358 • Letter: 1

Question

1. How many bits are required to represent each of the following sets of integers to Represent unsigned integers in binary?
(a)The integers from 0 to 255 inclusively.
(b) The integers from 0 to 4,095 inclusively.
(c) The integers from 0 to 1,234,567 inclusively

2. How large a value can be represented by each of the unsigned binary quantities?
(a)A 6-bit quantity.
(b)A 10-bit quantity.
(c)A 16-bit quantity.

3. Convert each of the following binary numbers into decimal. Assume these quantities represent unsigned integers. (a)1101
(b)10101
(c) 1001110
(d) 100000000

4. Convert each of the following decimal numbers into binary.
(a) 9
(b) 14
(c) 200
(d) 511

Explanation / Answer

1.
(a) To represent integers from 0 to 255 in Unsigned binary, 8 bits are required, because unsigned integers range is 0 to 2 power (n-1). [n is 8 here]
(b) To represent integers from 0 to 4,095 in Unsigned binary, 12 bits are required, because unsigned integers range is 0 to 2 power (n-1). [n is 12 here]
(c) To represent integers from 0 to 1,234,567 in Unsigned binary, 21 bits are required, because unsigned integers range is 0 to 2 power (n-1). [n is 21 here]

2.
(a) In 6-bit quantity, the largest value is 63, because the formulae to find the largest value is (2 power (n)) - 1. [n is 6 here]
(b) In 10-bit quantity, the largest value is 1023, because the formulae to find the largest value is (2 power (n)) - 1. [n is 10 here]
(c) In 16-bit quantity, the largest value is 65535, because the formulae to find the largest value is (2 power (n)) - 1. [n is 16 here]
  
  
3.
(a) Step 1: Multiply each binary digit by a particular weight factor and accumulate the sum, i.e., 1 * (2 power 3) + 1 * (2 power 2) + 0 * (2 power 1) + 1 * (2 power 0)
Step 2: So, Answer for binary number 1101 in decimal is 13.
  
(b) Step 1: Multiply each binary digit by a particular weight factor and accumulate the sum, i.e., 1 * (2 power 4) + 0 * (2 power 3) + 1 * (2 power 2) + 0 * (2 power 1) + 1 * (2 power 0)
Step 2: So, Answer for binary number 10101 in decimal is 21.
  
(c) Step 1: Multiply each binary digit by a particular weight factor and accumulate the sum, i.e., 1 * (2 power 6) + 0 * (2 power 5) + 0 * (2 power 4) + 1 * (2 power 3) + 1 * (2 power 2) + 1 * (2 power 1) + 0 * (2 power 0)
Step 2: So, Answer for binary number 1001110 in decimal is 78.

(d) Step 1: Multiply each binary digit by a particular weight factor and accumulate the sum, i.e., 1 * (2 power 8) + 0 * (2 power 7) + 0 * (2 power 6) + 0 * (2 power 5) + 0 * (2 power 4) + 0 * (2 power 3) + 0 * (2 power 2) + 0 * (2 power 1) + 0 * (2 power 0)
Step 2: So, Answer for binary number 100000000 in decimal is 256.
  
4.
(a) Decimal value of 9 in binary :
  
For signed positive integers, divide the number repeatedly by 2,
use "remainders" rather than "quotient", until you get down to 1.
  
Step (1): 9/2 = quotient = 4 remainder = 1
Step (2): 4/2 = quotient = 2 remainder = 0
Step (3): 2/2 = quotient = 1 remainder = 0
Step (4): 1/2 = quotient = 0 remainder = 1
  
Now read the remainders from bottom to top: the binary equivalent is 1001
  
So, Answer for signed postive value of 9 in binary is: 1001
  
(b) Decimal value of 14 in binary :
  
Step (1): 14/2 = quotient = 7 remainder = 0
Step (2): 7/2 = quotient = 3 remainder = 1
Step (3): 3/2 = quotient = 1 remainder = 1
Step (4): 1/2 = quotient = 0 remainder = 1
  
Now read the remainders from bottom to top: the binary equivalent is 1110
  
So, Answer for signed postive value of 14 in binary is: 1110
  
(c) Decimal value of 200 in binary :
  
Step (1): 200/2 = quotient = 100 remainder = 0
Step (2): 100/2 = quotient = 50 remainder = 0
Step (3): 50/2 = quotient = 25 remainder = 0
Step (4): 25/2 = quotient = 12 remainder = 1
Step (5): 12/2 = quotient = 6 remainder = 0
Step (6): 6/2 = quotient = 3 remainder = 0
Step (7): 3/2 = quotient = 1 remainder = 1
Step (8): 1/2 = quotient = 0 remainder = 1
  
Now read the remainders from bottom to top: the binary equivalent is 11001000
  
So, Answer for signed postive value of 200 in binary is: 11001000
  
(d) Decimal value of 511 in binary :
  
Step (1): 511/2 = quotient = 255 remainder = 1
Step (2): 255/2 = quotient = 127 remainder = 1
Step (3): 127/2 = quotient = 63 remainder = 1
Step (4): 63/2 = quotient = 31 remainder = 1
Step (5): 31/2 = quotient = 15 remainder = 1
Step (6): 15/2 = quotient = 7 remainder = 1
Step (7): 7/2 = quotient = 3 remainder = 1
Step (8): 3/2 = quotient = 1 remainder = 1
Step (9): 1/2 = quotient = 0 remainder = 1
  
Now read the remainders from bottom to top: the binary equivalent is 111111111
  
So, Answer for signed postive value of 511 in binary is: 111111111