Starting from:

$25

CSC342_343 - Computer Science  - Quiz No 1  - Solved

 For each 8 BIT binary pattern shown in the table below  please write corresponding values of the following interpretations: UNSIGNED INT, SIGNED INT, UNSIGNED  Fixed Point, SIGNED Fixed Point. 

Each correctly answered column is 2.5 points. FIXED POINT IS LOCATED TWO POSITIONS FROM THE LEFT! MOST SIGNIFICANT BIT IS 7. LEAST SIGNIFICANT BIT IS 0. 

 

76543210 
UNSIGNED INT 
SIGNED INT 
UNSIGNED       Fixed Point 
SIGNED          Fixed Point 
100000
00 
 
 
 
 
 
 
100000
11 
 
 
 
 
 
 
100000
01 
 
 
 
 
 
 
010000
01 
 
 
 
 
 
 
011111
11 
 
 
 
 
 
 
111111
11 
 
 
 
 
 
 
111111
00 
 
 
 
 
 
 
000000
00 
 
 
 
 
 
 
011111
10 
 
 
 
 
 
 
100011
10 
 
 
 
 
 
 
000100
11 
19 
+19 
4+ 
=  
+4+ 
=+  
 

 
 

Fixed Point 
 
 

2. [10 po
ints] What is the most negative number (largest absolute value negative) that can be 
represented using 16 bit signed integer representation?                  Please circle around over all the correct ones:                    -32768, -65536, -16384, -32767, NONE 

 

3.      [ 10 points]Please subtract two number in Hex. Then convert each operand to binary and perform the same operation in binary, then repeat BASE 10. The signed integers are represented using two’s complement. 

 

  0x0E 
 
             



  0xFF 
 
                
Result:     0x                                               0000 0000b                                  dec:               

 

4.      [20 points]  

Determine the MINIMAL number of bits required to represent -127.75 using: 

                                             

4.1  (5 points) ASCII code                                                      bits                          (please write the number of bits in the cell)            

4.2  (5 points) Binary Fixed Point representation                                bits   (please write the number of bits in the cell)  And the corresponding binary Fixed Point representation here.                                                   

                                          

 0       0     0     0     0     0     0     0     0     0            0     0                             0 

                                                

                                    Fixed Point
4.3 (5 points) Take the result from you answer in 4.2 and shift fixed point by 2 positions to the RIGHT. Please write down the resulting signed decimal value,  
 And the corresponding binary Fixed Point representation here.                                                     

0       0          0     0     0     0     0     0     0     0            0     0                             0 

  

 

 

4.      4(5 points) Please write down the signed rational number stored in the 9-bit word below: 

 

 

 

5.      [ 10 points] Please determine if single precision floating point representation given below is NAN,or +Infinity,Infinity, or a valid number  floating point : The top row shows the bit index. PLEASE JUSTIFY your ANSWER and  SHOW your work! Just the final result will not count as a correct answer. 

  

 

 

6.      [ 10 points] Please determine the decimal value (scientific notation) of the single precision floating point representation given below: The top row shows the bit index. PLEASE SHOW your work! Just the final result will not count as correct answer. If  it represents NAN, or  Infinity, or zero please state this and justify. 

  

 

 

7.      [ 5 points] Please determine the decimal value (scientific notation) of the single precision floating point representation given below: The top row shows the bit index. PLEASE SHOW your work! Just the final result will not count as correct answer. If  it represents NAN, or  Infinity, or zero please state this and justify. 

3


3


2


2


2


2


3


2


2


2


2


2


1


1


1


1


1


1


1


1


1


1












































 

 

 

 

 

 

8.      [ 5 points] Please determine the decimal value (scientific notation) of the single precision floating point representation given below: The top row shows the bit index. PLEASE SHOW your work! Just the final result will not count as correct answer. If  it represents NAN, or  Infinity, or zero please state this and justify. 

3


3


2


2


2


2


3


2


2


2


2


2


1


1


1


1


1


1


1


1


1


1












































 In EACH Questions 10.1-10.4  you are given SIGNED Integers stored in 32 BIT Registers. (Not 33-BIT Register ). 

Please write decimal, and binary operands and the results. For each question you have to write the result and overflow or No overflow. You may override ‘0’ with ‘1’. 

10.1            (5 points) What is the result (hexadecimal, decimal and binary) of the following addition: 

      0x0000000E  

     + 

              0xFFFFFFFF                                       

HEX:     0x                  Decimal:          Binary:0000 0000 0000 0000 0000 0000 0000 0000 

------------------------------------------------------------------------------------------------------------------------------------------------------- 

10.2            (5 points)  What is the result (hexadecimal, decimal and binary) of the following subtraction: 

 

                   0x7FFFFFFF   

            -                                                                                 

 0xFFFFFFFF 

HEX:       0x0000000000                              Decimal:                    Binary:             00000000000000000000000000000000000 ------------------------------------------------------------------------------------------------------------------------------------------------------- 

10.3            (5 points) What is the result(hexadecimal, decimal and binary) of the following subtraction: 

                0x80000000 

    - 

 0xFFFFFFFF 

HEX:       0x                                      Decimal:                          Binary: 00000000000000000000000000000000000 

 

----------------------------------------------------------------------------------------------------------------------------------------------------- 10.4  (5 points) What is the result(hexadecimal, decimal and binary) of the following addition: 

                 0X7FFFFFFF   

       + 

                0XFFFFFFFF 

 

HEX:     0X                                 Decimal:                                 Binary      

 

 

 

 

Please write your result in the following form: 

 

OVEREFLOW  
     0x80000000 

    +                           

 
0xFFFFFFFF
 
HEX:     
0x7FFFFFFF
        
Decimal:+231-1 Binary: 01111111111111111111111111111111  

More products