Question

In: Computer Science

Q1: Translate the following Bytes to Decimal and Hexadecimal a) 00001001 b) 111111111 c) 11101110 d)...

Q1: Translate the following Bytes to Decimal and Hexadecimal

a) 00001001

b) 111111111

c) 11101110

d) 01010101

Solutions

Expert Solution

a) 00001001
Decimal:
1     *  2^0    =  1  *  1  =  1
0     *  2^1    =  0  *  2  =  0
0     *  2^2    =  0  *  4  =  0
1     *  2^3    =  1  *  8  =  8
sum = 1 + 0 + 0 + 8 = 9
( 1001 )2 = ( 9 )10

Hexadecimal:
1001
9

( 1001 )2 = ( 9 )16

=======================================

b) 111111111
Decimal:
1     *  2^0    =  1  *  1  =  1
1     *  2^1    =  1  *  2  =  2
1     *  2^2    =  1  *  4  =  4
1     *  2^3    =  1  *  8  =  8
1     *  2^4    =  1  *  16 =  16
1     *  2^5    =  1  *  32 =  32
1     *  2^6    =  1  *  64 =  64
1     *  2^7    =  1  *  128    =  128
1     *  2^8    =  1  *  256    =  256
sum = 1 + 2 + 4 + 8 + 16 + 32 + 64 + 128 + 256 = 511
( 111111111 )2 = ( 511 )10

Hexadecimal:
0001 1111 1111
1 F F

( 111111111 )2 = ( 1FF )16

====================================
c) 11101110
Decimal:
0     *  2^0    =  0  *  1  =  0
1     *  2^1    =  1  *  2  =  2
1     *  2^2    =  1  *  4  =  4
1     *  2^3    =  1  *  8  =  8
0     *  2^4    =  0  *  16 =  0
1     *  2^5    =  1  *  32 =  32
1     *  2^6    =  1  *  64 =  64
1     *  2^7    =  1  *  128    =  128
Sum = 0 + 2 + 4 + 8 + 0 + 32 + 64 + 128 = 238
( 11101110 )2 = ( 238 )10


Hexadecimal:
1110 1110
E E

( 11101110 )2 = ( EE )16

====================================

d) 01010101
Decimal:
1     *  2^0    =  1  *  1  =  1
0     *  2^1    =  0  *  2  =  0
1     *  2^2    =  1  *  4  =  4
0     *  2^3    =  0  *  8  =  0
1     *  2^4    =  1  *  16 =  16
0     *  2^5    =  0  *  32 =  0
1     *  2^6    =  1  *  64 =  64
Sum = 1 + 0 + 4 + 0 + 16 + 0 + 64 = 85
( 1010101 )2 = ( 85 )10

Hexadecimal:
0101 0101
5 5

( 1010101 )2 = ( 55 )16


Related Solutions

Convert the following numbers from decimal to hexadecimal (and for each, indicate how many bytes would...
Convert the following numbers from decimal to hexadecimal (and for each, indicate how many bytes would be needed to store the value of that number): 10 15 16 256 250 358 1024 1023 8195
Q1. Formulate the logical constraints for the following statements (where A, B, C, and D are...
Q1. Formulate the logical constraints for the following statements (where A, B, C, and D are all binary variables): a. If A happens then B or C happens. b. If A and B happen then C and D must happen. c. If A happens or B does not happen then C or D must happen. d. If A happens or B happens then C and D happen. This has previously been posted before on Chegg but there are conflicting answers...
Hexadecimal numbers are numbers in base 16. They use the following sixteen digits: 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F. They are...
Hexadecimal numbers are numbers in base 16. They use the following sixteen digits: 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F. They are widely used in computing, for example, to represent colors or network addresses of computers. Convert A2F 1316 to decimal. Show your work. Convert 456710 into hexadecimal. Show your work. Convert 00010101100011002 to hexadecimal. Explain how can you use the fact that 16 = 24? If you convert a 64-bit binary number into hexadecimal, how many hexadecimal digits does it have? Explain.
Explain the following: a bit, octet, hexadecimal, and decimal value
Explain the following: a bit, octet, hexadecimal, and decimal value
Write a program in C++ that converts decimal numbers to binary, hexadecimal, and BCD. You are...
Write a program in C++ that converts decimal numbers to binary, hexadecimal, and BCD. You are not allowed to use library functions for conversion. The output should look exactly as follows: DECIMAL      BINARY                     HEXDECIMAL                      BCD 0                      0000 0000                   00                                            0000 0000 0000 1                      0000 0001                   01                                            0000 0000 0001 2                      0000 0010                   02                                            0000 0000 0010 .                       .                                   .                                               . .                       .                                   .                                               . 255                  1111 1111                   FF                                            0010 0101 0101
- sparc assembly - *Write a program that takes four 32-bit integers (A,B,C,D) in hexadecimal form...
- sparc assembly - *Write a program that takes four 32-bit integers (A,B,C,D) in hexadecimal form and calculates A*B + C*D. (Assumption: User input is 32-bit 0 or positive. The result is expressed in 64 bits.) [result example] bash $ assm Hex value? ffffffff Hex value? 8 Hex value? ffffffff Hex value? 8 Result is 0000000f fffffff0
Consider the cross: A/a; b/b; C/c; D/d; E/e x A/a; B/b; c/c; D/d; e/e a) what...
Consider the cross: A/a; b/b; C/c; D/d; E/e x A/a; B/b; c/c; D/d; e/e a) what proportion of the progeny will phenotypically resemble the first parent? b) what proportion of the progeny will genotypically resemble neither parent?
Answer Q1-Q4 choose a, b, c,d and e for each questions to Answer Q1.If you find...
Answer Q1-Q4 choose a, b, c,d and e for each questions to Answer Q1.If you find a group of organisms that all appear to have similar appearances, you could say that they belong to the same species within kingdom Animalia if ____. a. they are eukaryotic, regardless of whether they are multicellular or single-celled b. they are multicellular eukaryotes that look different from other organisms in the area. c. they are multicellular eukaryotes that look the same. d. they are...
Translate the following tasks into Hack C-Instructions: 1) Set D to A - 1 2) Set...
Translate the following tasks into Hack C-Instructions: 1) Set D to A - 1 2) Set both A and D to A + 1 3) Set D to 19 4) Set both A and D to A + D 5) Set RAM[5034] to D - 1 6) Set RAM[543] to 171 7) Add 1 to RAM[7], and store result in D 8) Add 3 to RAM[12], and store result in D
Q1. a. Given a schema R (A, B, C, D, E, F) and a set F...
Q1. a. Given a schema R (A, B, C, D, E, F) and a set F of functional dependencies {A → B, A → D, CD → E, CD → F, C → F, C → E, BD → E}, find the closure of the set of functional dependencies ?+ b. Given a schema R = CSJDPQV and a set FDs of functional dependencies FDs = {C → CSJDPQV, SD → P, JP → C, J → S} 1. Find...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT