Question

In: Computer Science

Convert the following decimal numbers to binary (You may use as many binary digits as necessary)...

  1. Convert the following decimal numbers to binary (You may use as many binary digits as necessary)
    1. 25610
    2. 246710
    3. 102310
    4. 2310
    5. 710
  2. Convert the following binary numbers to hexadecimal
    1. 1101 0010 1101 1111
    2. 1100 0101 0010 1001
    3. 1000 0000 0000 0001
    4. 0001 1000 0000 0000
  3. Given  bits, how many unsigned binary numbers can be represented?
  4. Given  bits, how many signed binary numbers can be represented using the two’s compliment method?
  5. In the two’s complement method, why is there one more negative number than there are positive numbers?

Solutions

Expert Solution

1)
a)
Divide 256 successively by 2 until the quotient is 0
256/2 = 128, remainder is 0
128/2 = 64, remainder is 0
64/2 = 32, remainder is 0
32/2 = 16, remainder is 0
16/2 = 8, remainder is 0
8/2 = 4, remainder is 0
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 100000000
Answer: 100000000

b)
Divide 2467 successively by 2 until the quotient is 0
2467/2 = 1233, remainder is 1
1233/2 = 616, remainder is 1
616/2 = 308, remainder is 0
308/2 = 154, remainder is 0
154/2 = 77, remainder is 0
77/2 = 38, remainder is 1
38/2 = 19, remainder is 0
19/2 = 9, remainder is 1
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 100110100011
Answer: 100110100011

c)
Divide 1023 successively by 2 until the quotient is 0
1023/2 = 511, remainder is 1
511/2 = 255, remainder is 1
255/2 = 127, remainder is 1
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 1111111111
Answer: 1111111111

d)
Divide 23 successively by 2 until the quotient is 0
23/2 = 11, remainder is 1
11/2 = 5, remainder is 1
5/2 = 2, remainder is 1
2/2 = 1, remainder is 0
1/2 = 0, remainder is 1
Read remainders from the bottom to top as 10111
Answer: 10111

e)
Divide 7 successively by 2 until the quotient is 0
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 111
Answer: 111


Related Solutions

Convert the following numbers as indicated. Use as few digits in the results as necessary or...
Convert the following numbers as indicated. Use as few digits in the results as necessary or as many as indicated in the problems (note: don't use table lookup). a) (011011101)2 to Base 10 b) (-69)10 to binary 2's complement representation using 9 bits c) (75.3125)10 to unsigned binary d) (-152)10 to hexadecimal 2’s complement representation
i need to convert decimal to twos complement binary and then add the binary digits but...
i need to convert decimal to twos complement binary and then add the binary digits but I am unable to do it. I am only allowed to use string, can anyone help me out please. i need the code urgently. #include #include #include #include using namespace std; string reverse(string s) { string x = ""; for (long i = s.length() - 1; i >= 0; i--) { x += s[i]; } return x; } string twosComplementStringsAddition(string A, string B) {...
Develop a python program to convert two decimal numbers (A and B) to binary numbers. You...
Develop a python program to convert two decimal numbers (A and B) to binary numbers. You should generate B complement signal (flip all the bits of Input B,
Convert these numbers from Decimal to Binary 111: 66: 252 11 20 Convert these numbers from...
Convert these numbers from Decimal to Binary 111: 66: 252 11 20 Convert these numbers from Binary to Decimal 00110110 11111000 00000111 10101010 What is the Default Subnet mask of Class A IPV4 What is the Default Subnet mask of Class B IPV4 What is the Default Subnet mask of Class C IPV4 What is the CIDR notation or / short handwriting of Subnet masks: Class A: /?. Explain the reason Class B: /? Explain the reason Class C: /?...
Convert the following unsigned numbers to the requested form: 01100001 binary to: hex, and also decimal...
Convert the following unsigned numbers to the requested form: 01100001 binary to: hex, and also decimal Hex: Decimal: b) 136 decimal to: hex, and also binary Hex: Binary:
Convert a list of decimal numbers into their binary and hexadecimal equivalents Add the elements of...
Convert a list of decimal numbers into their binary and hexadecimal equivalents Add the elements of each of these lists to generate a total sum Print the lists, and the total sum of each value C++ contains some built-in functions (such as itoa and std::hex) which make this assignment trivial. You may NOT use these in your programs. You code must perform the conversion through your own algorithm. The input values are: 5 9 24 2 39 83 60 8...
Convert the following binary values to hexadecimal and decimal (1 pt each) Write Hex Numbers as...
Convert the following binary values to hexadecimal and decimal (1 pt each) Write Hex Numbers as 0x##(ex 0x0A, 0xFF) Binary Hexadecimal Decimal 0001-1011 0x 0000-1000 0000-0100 0000-1001 0001-1111 1001-1001 0111-1010 1100-0010 1110-0101 1000-1010 0011-0100 0001-1001 0100-0011 1111-1111 1110-0111 0001-0010 0100-1000 0100-1110 1001-0001 0110-1100 Name: Convert the following hexadecimal values to binary and decimal Write binary numbers as 0000-0000 Hexadecimal Binary Decimal 0xf1 0xac 0x56 0x6c 0x32 0x30 0x05 0x28 0xf0 0x07 0x42 0xb9 0x6d 0x2f 0x71 0x0e 0x2d 0xfb 0xba...
Converting from Decimal to Binary The algorithm you will use in this assignment to convert from...
Converting from Decimal to Binary The algorithm you will use in this assignment to convert from base 10 to base 2 is: If the decimal number is zero, then the binary value is "0" Otherwise, start with an empty String to contain your binary value While your decimal number is not zero Get the remainder of what your current decimal number would be when divided by 2. Prepend this result to the front of your String. Divide your decimal number...
Problem: Convert the following binary number to decimal. 1. 110101.101 Problem: Convert the following decimal number...
Problem: Convert the following binary number to decimal. 1. 110101.101 Problem: Convert the following decimal number to fractional binary representation. 1. 103.5625
convert fraction decimal number 14/13 to acorrectly rounded binary number with 8 digits.
convert fraction decimal number 14/13 to acorrectly rounded binary number with 8 digits.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT