Starting from:

$30

COMP3350 Project 1-Data representation and simple logic operations Solved



•       Get you familiar with data representation and simple logic operations for this course. 


Questions:  

1. (9 points) Convert the following unsigned base 2 numbers (binary) to base 16 numbers (hexadecimal):

A.  0110 0001 1111

B.   1000 1111 1100

C.   0001 0110 0100 0101  

 

2.  (27 points)  

(2.1) Convert the following binary

a.   1100 1010  

b.  1111 0010

c.   1000 0111  

numbers into base 10 numbers (decimal), binary numbers are represented in signed magnitude representation.  

(2.2)          Redo the question 2.1, if the binary number are represented in One’s complement representation.  

(2.3)          Redo the question 2.1, if the binary number are represented in Two’s complement representation.  

For example, question (2.1), if 1100 1010 is a binary number represented in signed magnitude representation, what is the decimal value? Also do it again if 1100 1010 is a binary number in one’s complement representation and two’s complement representation. There 9 questions in total.


3. 

(3.1) Convert the following base 10 (decimal) values to binary numbers (8-bits): a. -100d  

b.  -16d  

c.   -21d  

d.  -0d  

Each binary result represented in Signed magnitude representation.  

(3.2)  Redo the question (3.1), convert binary into in One’s complement representation.  

(3.3)  Redo the question (3.1), convert binary into in Two’s complement representation.  


 

4.  What is the range of: A. An unsigned 7-bit number?  

B. A signed 7-bit number?  

 

5.   Provide the answer to the following problems (∧ = AND, ∨ = OR)  

1.       1000 ∧ 1110  

2.       1000∨1110  

3.       (1000∧1110) ∨ (1001∧1110)  

 

 

6.  Please demonstrate each step in the calculation of the arithmetic operation 25 - 65. (both 25 and 65 are signed decimal numbers)  

 

7.   Mathematically the answer in Q6 is -40d. Please verify your answer in Q6 using a conversion of 2’s and decimal numbers.

 

More products