Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can somebody help me out, please? 1) How are the following decimal numbers represented in 16 bit hexadecimal? a. 2510 b. 15710 c. 32510 2)

Can somebody help me out, please?

1) How are the following decimal numbers represented in 16 bit hexadecimal?

a. 2510 b. 15710 c. 32510

2) How are the following unsigned hexadecimal numbers represented in 16 bit binary?

a. 9C16

b. 1F16

c. 0C16

3) Give the 2s complement form (using 16 bits, or half-word) for each of the following numbers:

a. 13

b. -13

c. 156

d. -209

4) Perform the following calculations involving decimal values using 2s complement arithmetic within the amount of bit precision available. Show the resulting value in both decimal and binary, AND indicate whether there is an overflow condition or not.

a. 13 + 8 with 5 bits precision

b. 13 + 8 with 6 bits precision

c. 13 8 with 5 bits precision

d. 13 8 with 6 bits precision

e. -13 8 with 5 bits precision

f. -13 8 with 6 bits precision

g. 105 57 with 8 bits precision

5) Perform the following multiplication operations of decimal values using bit shift operations. Show your work, for example:

15*11 = 15 * (8+2+1) = 15 *8 + 15 * 2 + 15 * 1 = (0000 1111 << 3) + (0000 1111 << 1) + (0000 1111 << 0) =

0111 1000 + 0001 1110 + 0000 1111 = 1010 0101 = 165

a. 5 * 4

b. 13 * 12

c. 7 * 10

d. 15 * 5

6) What is the hexadecimal representation of the following ASCII character strings (note that the quotation mark is a delimiter and part of the string value):

a. 52

b. -127

7) Perform the following division operations of decimal values using only bit shifts operations. Show your work, similar to the example for multiplication in problem 5:

a. 12 / 8

b: 64 / 16

8) Explain the difference between a short circuiting and non-short circuiting logical Boolean expressions.

9) What hexadecimal value would you add or subtract to the following ASCII character values to convert them to either upper or lower case? Indicate both the value (in hex) and operation (add or subtract).

a. 0x41 (character A)

b. 0x6e (character n)

10) Write a program in the High Level Language (HLL: Java, C, C++) of your choice to take a character string representing a binary number, and write out the number in hex. You can assume the characters in the string are either 0 or 1 and the length of the string is some multiple of 4.

For example, in Java:

String binary = 0110110101001111, hexchar;

int currentposition = 0;

for (int count = 0; count < (binary.length() 1); count = count + 4)

{

System.out.print(hexchar);

}

System.out.println();

The result should be on the monitor:

6D4F

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Spomenik Monument Database

Authors: Donald Niebyl, FUEL, Damon Murray, Stephen Sorrell

1st Edition

0995745536, 978-0995745537

More Books

Students also viewed these Databases questions