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
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
For each of the following simplicial complexes ,X = {[a], [b], [c], [d], [a, b], [c,...
For each of the following simplicial complexes ,X = {[a], [b], [c], [d], [a, b], [c, d]}, and X = {[a], [b], [c], [d], [e], [a, b], [b, c], [c, d], [a, d], [a, c], [a, e], [b, e], [a, b, c]},give a basis for each non-zero Hj(X).
Program that does conversions (i.e. decimal to hexadecimal, binary to decimal) but needs to have a...
Program that does conversions (i.e. decimal to hexadecimal, binary to decimal) but needs to have a drop down menu to give you the option to choose with conversion you want to go from and convert into (JOptionPane). Cannot use the conversion tool that is built-in Java. Need to use equations or some sort. Please include comments on what is happening to understand.
Consider the following propositional formula: (((A ^ B) -> C) ^ ((A ^ C) -> D))...
Consider the following propositional formula: (((A ^ B) -> C) ^ ((A ^ C) -> D)) -> ((A ^ B) -> D) Perform the following tasks for this formula: Convert this formula into CNF form and write a numbered list of all clauses obtained from this formula.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT