Question

In: Computer Science

I need clear explanation on how we got that answers. Thanks. 1. What is the decimal...

I need clear explanation on how we got that answers. Thanks.

1. What is the decimal value for the 8 bit 2's complement number 0x36 arithmetic shift right by 3.

--> Ans is 6

2. What is the decimal value for the 8 bit 2's complement number 0x36 rotated left by 3

--> Ans is -79

Solutions

Expert Solution

Hexadecimal     Binary
    0           0000
    1           0001
    2           0010
    3           0011
    4           0100
    5           0101
    6           0110
    7           0111
    8           1000
    9           1001
    A           1010
    B           1011
    C           1100
    D           1101
    E           1110
    F           1111
Use this table to convert from hexadecimal to binary
Converting 36  to binary
3 => 0011
6 => 0110
So, in binary 36  is 00110110

1)
00110110 shifted right by 3 gives 00000110
since left most bit is 0, this number is positive
so, we can directly convert this into a decimal value
Converting 110 to decimal
110
=> 1x2^2+1x2^1+0x2^0
=> 1x4+1x2+0x1
=> 4+2+0
=> 6
Answer: 6

2)
00110110 shifted left by 3 gives 10110001
since left most bit is 1, this number is negative number.
so, follow these steps below to convert this into a decimal value.
I. first flip all the bits. Flip all 0's to 1 and all 1's to 0.
   10110001 is flipped to 01001110
II. Add 1 to above result
01001110 + 1 = 01001111
III. Now convert this result to decimal value
Converting 1001111 to decimal
1001111
=> 1x2^6+0x2^5+0x2^4+1x2^3+1x2^2+1x2^1+1x2^0
=> 1x64+0x32+0x16+1x8+1x4+1x2+1x1
=> 64+0+0+8+4+2+1
=> 79
Answer: -79

Related Solutions

Please, I need correct answers and clear explanation. Thanks, Indicate whether each of the following statements...
Please, I need correct answers and clear explanation. Thanks, Indicate whether each of the following statements is true or false: a. Under the accrual basis of accounting, when cash is collected on accounts receivable, revenue is recorded. b. Cash receipts from customers are debited to Accounts Receivable. c. The cash basis of accounting recognizes expenses when they are incurred. d. Under the cash basis of accounting, there is no such thing as a Prepaid Expenses account. e. Asset accounts and...
Please, I need a correct answer and clear explanation. Thanks! What are the advantages and disadvantages...
Please, I need a correct answer and clear explanation. Thanks! What are the advantages and disadvantages of using the accrual basis of accounting rather than the cash basis?
Please, I need a correct answer and clear explanation. Thanks, Explain how a prepaid expense differs...
Please, I need a correct answer and clear explanation. Thanks, Explain how a prepaid expense differs from an accrued expense.
I need the specific answers for these questions, and clear vision diagram thanks Consider the following...
I need the specific answers for these questions, and clear vision diagram thanks Consider the following tables: GENRE(GEN_CODE, GEN_DESCRIPTION) BOOK(BOOK_ISBN, BOOK_TITLE, BOOK_PRICE, GEN_CODE) For the tables given above, work on the problems below: 1. For each table, identify the primary key. 2. For each table, identify the foreign key(s). 3. Identify at least one candidate key. If there are no candidate keys, give an example of an attribute that could be used as a candidate key. 4. For one of...
Please I need a clear explanation and clear handwriting with explanaing this for me because I...
Please I need a clear explanation and clear handwriting with explanaing this for me because I am realy confused and need help. Thanks in advance My lab was about  Magnets and Magnetic fields. This is the question I need to answer for! R3: Explain how a speaker works by explaining why each part is required. after that Summarize R3’s answer by explaining why the proffesor homemade earbud is so much superior to the one that you made.
Please, read the question carefully. I need correct answers and clear explanation. Thank you! On Sept...
Please, read the question carefully. I need correct answers and clear explanation. Thank you! On Sept 15, 2017, Julia Inc entered into a contract to provide 12 new deep fryers to a Montreal Poutinerie. Julia normally charges $1,500 for each deep fryer. As part of the agreement, Julia will provide on-site training at the Poutinerie’s 3 locations. Julia will host 3 separate training sessions at each location. For this training, Julia normally charges $700 / day. The Poutinerie needed Julia’s...
Please, I need correct answers and clear explanation. You have been provided with the following information...
Please, I need correct answers and clear explanation. You have been provided with the following information about Bibi’s inventory for January 2018. Bibi uses a period inventory system to sell her customized Swell water bottles. While the water bottles come in different colours, she only sells one size so all her units are homogenous. Number of units Cost per unit Total cost Price per unit sold Total revenue January 1–Beginning inventory 1,250 $25.00 $31,250 January 6–Purchase 750 $24.00 $18,000 January...
How can inflation affect exchange rates? I need a clear explanation with clear reasoning and examples.
How can inflation affect exchange rates? I need a clear explanation with clear reasoning and examples.
Please, I need a correct answer and clear explanation. Thank you, Part I – Explanation Q1...
Please, I need a correct answer and clear explanation. Thank you, Part I – Explanation Q1 Below are pairs of changes that affect elements of the accounting equation. Give an example of a transaction or economic event that reflects each: a. Asset increases, asset decreases b. Asset increases, liability increases c. Asset increases, shareholders’ equity increases d. Asset increases, revenue increases e. Liability decreases, asset decreases f. Asset decreases, expense increases g. Liability decreases, revenue increases h. Asset decreases, shareholders’...
I need a clear explanation with illustration / instances  on the first Agile Principle that states "the...
I need a clear explanation with illustration / instances  on the first Agile Principle that states "the highest priority is to satisfy the customer through early and continuous delivery of valuable software”.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT