Question

In: Computer Science

Suppose I have a 32 bit register containing 0000AC12 in hex and I do a logical...

Suppose I have a 32 bit register containing 0000AC12 in hex and I do a logical shift >>2. What hex digits will result from the binary shift? Be sure to show all 32 bits in hex

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 0000AC12 to binary
0 => 0000
0 => 0000
0 => 0000
0 => 0000
A => 1010
C => 1100
1 => 0001
2 => 0010
So, in binary 0000AC12 is 00000000000000001010110000010010

logical shift >> 2, shifts this number to right by 2 bits
so, 00000000000000001010110000010010 becomes 00000000000000000010101100000100

Let's convert this back to hexadecimal
Converting 00000000000000000010101100000100 to hexadecimal
0000 => 0
0000 => 0
0000 => 0
0000 => 0
0010 => 2
1011 => B
0000 => 0
0100 => 4
So, in hexadecimal 00000000000000000010101100000100 is 00002B04
Answer: 00002B04

Related Solutions

1. Given the 8 bit hex number 0x5E, what smallest hex value would you have to...
1. Given the 8 bit hex number 0x5E, what smallest hex value would you have to add to set the Overflow flag? 2. Given the 8 bit hex number 0x6E, what smallest hex value would you have to add to set the Carry Flag? Please give detailed explanation on how to solve.
in verilog if i have a hex number how do i get a specific 4 bits?...
in verilog if i have a hex number how do i get a specific 4 bits? for exampe if i have a hex number 5055 how do i get the last four bits which would be 0101?
I have below code! I would like to to convert the larger variable to hex and...
I have below code! I would like to to convert the larger variable to hex and get len() of larger once it's in hex format. Example: if larger number is 900000 then the hex is DBBA0 then len of DBBA0 is 5. I need everything save in new variable! It's in C. // Function to find largest element int largest(int a[], int n) {     int large = a[0], i;     for(i = 1; i < n; i++)     {         if(large < a[i])...
make 4 bit universal shift register in vhdl plz include the test bench. I will rate
make 4 bit universal shift register in vhdl plz include the test bench. I will rate
What consequences does moving from a 32-bit environment to a 64-bit environment have on programs, including...
What consequences does moving from a 32-bit environment to a 64-bit environment have on programs, including the operating system?
How do I covert a char from a sting that is made up of hex values...
How do I covert a char from a sting that is made up of hex values into a long int, without using istringstream and istring in c++?
Objective: Design and test a 4-bit Right shift register with serial input. Part I Use D...
Objective: Design and test a 4-bit Right shift register with serial input. Part I Use D flip-flops (FF) in your design (Memory → D Flip-Flop). Ensure the output of each FF (Q) goes to an output so the functionally of the shift register can be verified. All 4 Flip-Flop need to share a common clock which is connected to an input you can control. Verify the functionally of the circuit by changing the input value and toggling the clock. You...
Suppose the cable company represents the channels your TV has access to with a 32-bit integer....
Suppose the cable company represents the channels your TV has access to with a 32-bit integer. Each channel from 0 to 31is represented by one bit, where 1 means the channel is enabled and 0 means the channel is disabled. Assume channel 0 is the least significant bit. When you get your cable box, the technician sets the 32-bit code. // for example, this code enables channels 0, 1, and 2 only intcode= 7; In cableCompany.c, write code for the...
Suppose that 32% of people have a dog, 27% of people have a cat, and 12%...
Suppose that 32% of people have a dog, 27% of people have a cat, and 12% have both. What is the probability that someone owns a dog but not a cat?
Imagine you have a spare desktop machine with an Intel Pentium IV 2.8 GHz (32-bit) CPU,...
Imagine you have a spare desktop machine with an Intel Pentium IV 2.8 GHz (32-bit) CPU, 2 GB RAM memory and 512 GB storage memory. This machine is connected to the internet using your home internet router. You would like to use this machine to host: i.a personal web server ii.a personal email server iii.a personal database server. How you would proceed to select and configure these servers? Your discussion must cover the following points: The name of the Linux...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT