Question

2. There are 26 characters in the alphabet we use for writing English. What is the...

2. There are 26 characters in the alphabet we use for writing English. What is the least number of bits needed to give each character a unique bit pattern?
How many bits would we need to distinguish between upper- and lowercase versions of all 26 characters? (12 points)

  1. What is the largest positive number one can represent in an 8-bit 2's complement code? Write your result in binary and decimal.

a. What is the greatest magnitude negative number one can represent in an 8-bit 2's complement code? Write your result in binary and
decimal.

b. What is the largest positive number one can represent in n-bit 2's complement code? 


c. What is the greatest magnitude negative number one can represent in n-bit 2's complement code? 


  1. Convert the following 2's complement binary numbers to decimal. (9 points)
    a. 1010


b. 01011010


            c. 11111110


0 0
Add a comment Improve this question Transcribed image text
Answer #1

QUESTION : There are 26 characters in the alphabet we use for writing English. What is the least number of bits needed to give each character a unique bit pattern?

SOLUTION : No. of combinitions that can be represented by n bits is 2^n.

1 bit = 2^1 combinitions = 2, but we need 26 unique combinitions only so 1 bit is not enough.

2 bits= 2^2 combinitions = 4, but we need 26 unique combinitions only so 2 bits are not enough.

3 bit = 2^3 combinitions = 8, but we need 26 unique combinitions only so 3 bits are not enough.

4 bit = 2^4 combinitions = 16, but we need 26 unique combinitions only so 4 bits are not enough.

5 bit = 2^5 combinitions = 32, we can definitely represt 26 unique combinitons .

So from above we can clearly say that the 5 bits are needed to represent 26 characters.

QUESTION : How many bits would we need to distinguish between upper- and lowercase versions of all 26 characters?

SOLUTION : In the previous question we ONLY considered either upper case or ONLY lower case letters are required. If both are required together then total different combinitions are 52. On calculating from the above formula we get the answer as 6 bits .

QUESTION : What is the largest positive number one can represent in an 8-bit 2's complement code? Write your result in binary and decimal.

SOLUTION : Two write a negative number in 2's complement we first write the positive number and then convert it to negative.

Steps to get representation of a negative number:

1) Write the corresponding positive number.

2) Going from right to left invert every bit after the first " 1".

Ex. Represent -2 in 8 bit 2's complement.

2 in 8 bit 2's complement is 00000010

Therefore -2 will be = 11111110

Since out of 8 bits we can use only 7, therefor a total of 2^7 numbers can be represented which is 128 positive numbers , which is 0 to 127.

DECIMAL = 127

BINARY = 01111111

QUESTION :  What is the greatest magnitude negative number one can represent in an 8-bit 2's complement code? Write your result in binary and
decimal.

SOLUTION : Just like we did above, we are left with 128 other combinitions which can all be used to represent 128 negative numbers, which is from -1 to -128.

Therefore the magnitude of the maximum negative number that we can represent is 128.

DECIMAL = -128

BINARY = 10000000

QUESTION : What is the largest positive number one can represent in n-bit 2's complement code?

SOLUTION : From previously solved questions we can deduce that, for n bits:

Total positive numbers = 2^ (n -1) i.e from ) 0 to 2^(n-1) - 1

Therefore, maximum positive number = 2^(n-1) - 1

QUESTION : What is the greatest magnitude negative number one can represent in n-bit 2's complement code?

SOLUTION : From previously solved questions we can deduce that, for n - bits:

We can have a total of 2^(n-1) negative numbers from -1 to - 2^(n-1).

Therefore magnitude of the highest negative number is -2^(n-1).

QUESTION : Convert the following 2's complement binary numbers to decimal. (9 points)
a. 1010 b. 01011010 c.11111110

SOLUTION :

a. Since the first bit is 1, there it is negative. so we will first calculate the two's complement which is =  0110 and it's value is 6. Therefore the original number was -6.

b. Since the first bit is 0, therefore the number must be positive and we can directly convert it from binary to decimal which on calculating we get to be as 90.

c. Since the first bit is 1, there it is negative. so we will first calculate the two's complement which is = 00000010 , which is equal to 2. Therefore the original number was -2.   

Add a comment
Know the answer?
Add Answer to:
2. There are 26 characters in the alphabet we use for writing English. What is the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 1. What is the largest decimal number we can represent with a 16 bit two's complement...

    1. What is the largest decimal number we can represent with a 16 bit two's complement number? 2. Convert the following signed binary numbers to decimals. 11001         010011            1110100            1100111           3. Convert the following decimal numbers to 6-bit two's complement binary numbers and add them. Note if there is an overflow. 7 + 13 Two's complement/binary number for 7: Two's complement/binary number for 13: Sum: Overflow? 4. Convert the following decimal numbers to 6-bit two's complement binary numbers...

  • please include only the digits of the appropriate number system. In particular, do not precede the...

    please include only the digits of the appropriate number system. In particular, do not precede the answers with ‘0x’ or ‘0b’ or follow your answers with base indicators, like subscript 2 or 10. 1. A processor uses 24 bits for its memory addressing. How many possible distinct locations (in decimal) can the computer address? The computer memory address locations are numbered from 0 to the maximum. If a memory locations' address is (7243)10, how is this address represented in binary...

  • 2. Convert the following two's complement binary numbers to decimal numbers. These numbers are integers.

    2. Convert the following two's complement binary numbers to decimal numbers. These numbers are integers. a. 110101 b. 01101010 c. 10110101 3. Convert the following decimal numbers to 6-bit two's complement binary numbers and add them. Write the results in 6-bit two's complement binary number format and decimal number format. Indicate whether or not the sum overflows a 6-bit result. a. 14 + 12 b. 30 + 2 C. -7 + 20 d. -18-17 4. What is the signed/magnitude and two's complement range of...

  • Given n bits, how many unsigned integers can be represented with the n bits? What is...

    Given n bits, how many unsigned integers can be represented with the n bits? What is the range of these integers? (6 points) There are 26 characters in the alphabet we use for writing English. What is the least number of bits needed to give each character a unique bit pattern? How many bits would we need to distinguish between upper- and lowercase versions of all 26 characters? (12 points)

  • (1) Convert this Hexadecimal to Binary, Octal and Decimal : ABCDEF (2) how the representation of...

    (1) Convert this Hexadecimal to Binary, Octal and Decimal : ABCDEF (2) how the representation of each of these numbers in both two’s complement and sign magnitude formats. Use the following assumptions: ● Assume that the sign magnitude number should be represented in the fewest number of bits possible. ● Assume that the sign bit for negative sign magnitude numbers should be a 1. ● Assume that the two’s complement numbers should be 8 bit numbers. 1. 108 2. -65

  • An 8-bit register contains 87h. If this computer represents the numbers in 2’s complement system, what...

    An 8-bit register contains 87h. If this computer represents the numbers in 2’s complement system, what negative number in decimal does these 8 bits represent? Please show your work step by step

  • What is the most positve and most negative number that can be represented in 2's complement...

    What is the most positve and most negative number that can be represented in 2's complement system of 6 bits? Express the answer in decimal and binary.

  • In ALL these problems, you MUST show your conversion procedure. No procedure = zero points. a)...

    In ALL these problems, you MUST show your conversion procedure. No procedure = zero points. a) Convert the following decimal numbers to their 2's complement representations: binary and hexadecimal. (12 pts) ✓ -137.3125, 37.65625, -128.5078125, -31.25. b) We want to represent integer numbers between -1024 to 1024 using the 2C representation. What is the minimum number of bits required? (2 pts) c) Complete the following table. The decimal numbers are unsigned: 6 pts) Decimal Binary BCD | Reflective Gray Code...

  • Given the 8 - bit binary number: 1001 10 1 1 What decimal number does this...

    Given the 8 - bit binary number: 1001 10 1 1 What decimal number does this represent if the computer uses: signed magnitude representation (a) signed 1's complement (b) (c) signed 2's complement Assuming 2's complement 8 - bit representation, consider the following: +70 010001 10 21 +80 010100000 10010110 Is this correct? Why or why not?

  • Write a program that allows the user to enter an unsigned integer (the maximum value of...

    Write a program that allows the user to enter an unsigned integer (the maximum value of an unsigned 4-byte int is 232 = 4,294,967,296) and reverses its format (from little to big endian, or vice versa). Print out the user-entered number in hexadecimal and binary, reverse the endianness, and print the reverse in hexadecimal and binary. Integers in most machine architectures are represented in little endian format: the least significant byte is stored in the smallest address; for instance, the...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
Active Questions
ADVERTISEMENT