On a side note, if you send an email with the word homework in it, without any other words like question, comment, or help, I will assume it is a homework submission and not open it until I grade that homework.
If you don't show your work, there will be no partial credit.
2 |37 1
---
2|18 0
---
2|9 1 so 37 = 1001012
--
2|4 0 100|101
-- 4 5
3|2 0 so 37 = 458
--
1 0010|0101
2 5
so 37 = 2516
1 is the same as 00012 Flip the bits: 1110 +1 ---- 1111
8 is the same as 10002 Flip the bits: 1011111 +1 ---- 1 0 00
This starts with a 0, so it is a positive number. Just compute the magnitude 1011 = 8+2+1 = 11
This starts with a 1 so it is a negative number. Flip the bits and add 1. 10000 -> 01111 +1 = 100000 This is the special case in two's compliment. It is -2n-1 = -24 = -16
The first bit is 1, so it is a negative number. Flip the bits and add 1 to find the magnitude. 10101-> 01010 + 1 = 01011 = 11 So the original number is -11.
This is 0.
The fetch-decode-execute cycle consist of a series of actions within the
CPU to execute a single instruction.
The cycle begins by fetching the next instruction to be executed
from memory, the address of this instruction is stored in the
Program Counter (PC). This instruction is stored in the
Instruction Register (IR). Finally the PC is incremented by the
size of an instruction.
The decode portion of the cycle is performed by the Control Unit (CU) by
examining the data in the IR.
The CU then takes the steps necessary to execute the instruction , or
perform the action required by the instruction. This may include fetching
additional data from memory, loading or storing data contained in a general
purpose register, or instructing the Arithmetic Logic Unit to perform
a computation.
Once the execute phase is done, the Control Unit begins the cycle again
by fetching the next instruction.