程序代写代做代考 BY SUBMITTING THIS FILE TO CARMEN, I CERTIFY THAT I HAVE STRICTLY ADHERED TO THE TENURES OF THE OHIO STATE UNIVERSITY’S ACADEMIC INTEGRITY POLICY.

BY SUBMITTING THIS FILE TO CARMEN, I CERTIFY THAT I HAVE STRICTLY ADHERED TO THE TENURES OF THE OHIO STATE UNIVERSITY’S ACADEMIC INTEGRITY POLICY.

Name:
Wu Cai
CSE 2421
Autumn, 2020
Homework 1 – 117 points; grade reported in Carmen as a percentage (i.e. points earned/117)

Due Date: Tuesday, September 8, 2020 by 11:30PM. Only submissions via Carmen will be accepted without prior approval. To receive credit, solutions must be clearly written or typed and appear in the same order as the questions below. If you choose not to break up your binary values into 4-bit nibbles, making it harder to read your work, the graders are authorized to lower your grade by 20%. (e.g. if you would have received 80% on your homework, you will receive a grade of (80%*.8) or 64%)

Early submissions are allowable although no bonus awarded for early homework. Late submissions accepted for up to 24 hours after due date with 25% penalty (%correct *.75).
All of these exercises are to be completed without the use of any electronic devices. If you choose to ignore this requirement, know that you will likely have exercises very similar to those below on the mid-term where no electronic devices will be permitted. So you can learn how to manually solve these types of problems while doing this homework assignment or while you are taking your mid-term. 🙂 Choosing to validate your manually calculated answers via electronic means is highly encouraged.
[21 points] Convert the following then interpret the binary value as both a signed and unsigned value in decimal. Spaces in binary representations are there for readability only; you must use this technique in your answers.
• 0x39F7B6 to binary
• binary value: 0b 0011 1001 1111 0111 1011 0110
• signed interpretation of the binary value: -395338
• unsigned interpretation of the binary value: 3798966

• 0b 1101 0111 1001 1001 to hexadecimal
• hexadecimal value: 0xD799
• signed interpretation of the binary value: -10343
• unsigned interpretation of the binary value: 55193

• 0xD5C7C3 to binary
• binary value: 0d 1101 0101 1100 0111 1100 0011
• signed interpretation of the binary value: -2766909
• unsigned interpretation of the binary value: 14010307

• 0b1110 0110 1110 1011 0101 0011 to hexadecimal
• hexadecimal value: 0xE6EB53
• signed interpretation of the binary value: -1643693
• unsigned interpretation of the binary value: 15133523

• 0xCD6 to binary
• binary value: 0b 1100 1101 0110
• signed interpretation of the binary value: -810
• unsigned interpretation of the binary value: 3286

• 0xF2754882 to binary
• binary value: 0x 1111 0010 0111 0101 0100 1000 1000 0010
• signed interpretation of the binary value: -227194750
• unsigned interpretation of the binary value: 4067772546

• 0b 0100 0010 1010 0001 1110 0001 0100 1111 to hexadecimal
• hexadecimal value: 0x42A1E14F
• signed interpretation of the binary value: -1029578417
• unsigned interpretation of the binary value: 1117905231

• [20 points] Complete the following table. Binary values must be split into 4 bit nibbles for easier reading/grading. Use enough binary digits so that there is no doubt about what value is being represented. (i.e. positive vs negative value) Binary values MUST be represented with a minimum of 8 bits and all binary values must be represented with a number of bits divisible by 4. (i.e. minimum of 8 bits, but could be 12, 16, 20, etc.) I suggest that when the decimal value is given, that you first convert to binary, then to hex. When given the hexadecimal value, convert to a binary representation first, then, based on what the binary representation tells you with respect to MSB, you can determine the correct signed decimal value.
Decimal
Hexadecimal
Binary
12
0xC
0b 1100
-15
0x8F
0b 1000 1111
110
0x6E
0b 0110 1110
102
0x66
0b 0110 0110
2914
0xB62
0b 1011 0110 0010
-422
0x81A6
0b 1000 0001 1010 0110
1655
0x677
0b 0110 0111 0111
52757
0xCE15
0b 1100 1110 0001 0101
-2122
0x884A
0b 1000 1000 0100 1010
188
0x0bc
0b 1011 1100

• [28 points] Complete the table below showing the effects of the different shift operations. Use 8 bits for the binary representations. Note that each operation is based off of x in leftmost column.

 
Logical
 
Arithmetic
 
x
 
x<<1 x>>1

x>>1
Hex
Binary
Hex
Binary
Hex
Binary
Hex
Binary
0xE3
0b 1110 0011
0xC6
0b 1100 0110
0x71
0b 0111 0001
0xF1
0b 1111 0001
0x6A
0b 0110 1010
0xD4
0b 1101 0100
0x35
0b 0011 0101
0xB5
0b 1011 0101
0x94
0b 1001 0100
0x28
0b 0010 1000
0x4A
0b 0100 1010
0xCA
0b 1100 1010
0xA5
0b 1010 0101
0x4A
0b 0100 1010
0x52
0b 0101 0010
0xD2
0b 1101 0010

• [28 points] Complete the table below showing the effect of the different shift operations. Use 16 bits for the binary representations. Note that each operation is based off of x in the leftmost column.

Logical

Arithmetic
 
x
 
x<<2 x>>2

x>>2
Hex
Binary
Hex
Binary
Hex
Binary
Hex
Binary
0xB414
0b 1011 0100 0001 0100
0xD050
0b 1101 0000 0101 0000
0x2D05
0b 0010 1101 0000 0101
0xED05
0b 1110 1101 0000 0101
0x8556
0b 1000 0101 0101 0110
0x1558
0b 0001 0101 0101 1000
0x2155
0b 0010 0001 0101 0101
0xE155
0b 1110 0001 0101 0101
0x124C
0b 0001 0010 0100 1100
0x4930
0b 0100 1001 0011 0000
0x0493
0b 0000 0100 1001 0011
0xC493
0b 1100 0100 1001 0011
0x4794
0b 0100 0111 1001 0100
0x1E50
0b 0001 1110 0101 0000
0x11E5
0b 0001 0001 1110 0101
0xD1E5
0b 1101 0001 1110 0101

• [20 points]Complete the table below showing the effects of the different bitwise operations. All solutions should be shown in hexadecimal format. You may have to convert each value to its binary representation to perform the operations and then convert back to represent it in hexadecimal.
x
y
x & y
x | y
x ^ y
x ^ 0x44
y ^ 0x77
0xE3
0xAA
0xA2
0xEB
0x49
0xA7
0xDD
0x7F
0x63
0x63
0x7F
0x1C
0x3B
0x14
0x87
0xA7
0x87
0xA7
0xA0
0xC3
0xD0
0x3A
0x42
0x02
0x7A
0x78
0x7F
0x35