Question

In: Computer Science

1-List the different ways to represent signed integers and represent (-75) in these ways. Convert the...

1-List the different ways to represent signed integers and represent (-75) in these ways.

Convert the following:

  1. (345)10 = (                          )2      
  2. (563)10 = (                            )16
  3. (2AB5)16 = (                           )2
  4. (1011111100111100)2 = (                        )16

Find the two's complement for the following

  1. (11011101100100)2
  2. (34BC)16

           

2- Compute the following signed integer and determine if either there carry or overflow

  1. (01001110)2 + (10101100)2
  1. (01111000)2+ (00110001)2
  1. (00101101)2 - (01111110)2

Solutions

Expert Solution

=====================================

Different ways to represent signed integers are-------

1. sign and magnitude

2. 1's complement

3. 2's complement

Now represent   -75 In these ways

1. sign and magnitude

so we use 7 bit to represent 75 and 1 bit for sign

(-75)10 = (11001011)2      

2. 1's complement

   -75 =         10110100

3. 2's complement

      -75 = 10110101

====================================

Convert the following

A. (345)10 = (     )2

   345/2 = 172 + 1
   172/2 = 86   + 0
   86/2 = 43   + 0
   43/2 = 21   + 1
   21/2 = 10   + 1
   10/2 = 5    + 0
   5/2   = 2    + 1
   2/2   = 1    + 0
   1/2   = 0    + 1

   (345)10 = (101011001)2
  
B. (563)10 = ( )16

   563/16 = 35 + 3
   35/16   = 2 + 3
   2/16    = 0 + 2
  
   (563)10 = (233)16
  

C. (2AB5)16 = (   )2

   2      A       B      5
      0010 1010 1011 0101

    (2AB5)16 = (10101010110101)2


D. (1011111100111100)2 = (    )16

       1011 1111 0011 1100
         B     F    3   C
       
     (1011111100111100)2 = (BF3C)16
     ===========================================================================

Two's complement for the following
   
A. (11011101100100)2
     invert the digit and add 1 to it
     step 1 -Invert the digit
            11011101100100
           00100010011011
      step2 - add 1 to the final result
             00100010011011
                    + 1
             00100010011100     
            
      so now two's complement of (11011101100100)2 is 00100010011100     
    
B. (34BC)16

To find a twos complement of hexadecimal first we have to convert it into its binary form

        3         4       B       C
     0011 0100 1011   1100
   
      invert the digit and add 1 to it
     step 1 -Invert the digit
            0011 0100 1011 1100
           1100 1011 0100 0011
      step2 - add 1 to the final result
             1100101101000011
                    + 1
             1100101101000100
            
      so now two's complement of (0011010010111100)2 is 1100101101000100
    
      1100   1011   0100 0100  
       C          B    4 4
     
       So two's complement of (34BC)16 = (CB44)16
     

======================================================================================    
2 compute
A. (01001110)2 + (10101100)2 = (    )2


   + 1 0 0 1 1 1 0    (+ 78)
   - 0 1 0 1 1 0 0               (- 44)
     ---------------------------------
   + 0 1 0 0 0 1 0              (+ 34)
  
   (01001110)2 + (10101100)2 = (00100010)2


********************************************************************    


B. (01111000)2+ (00110001)2 = (   )2

          0 1 1 1 1 0 0 0    ( 120)
      + 0 0 1 1 0 0 0 1           (49)
      ===================
        1 0 1 0 1 0 0 1    (169)
      
      
        (01111000)2+ (00110001)2 = (010101001)2

**********************************************************************
      
C. (00101101)2 - (01111110)2   = ( )2
          45     -   126
    
      first complement of 1111110 is 0000001
    
      hence minud =                    0101101
      first complement of subtrahend = 0000001
                                       0101110
                                      --------
                                       1010001
                                     
      no carry hence the difference is negative
         answer is   -1010001        (-81)
    
    
  

     
   


Related Solutions

Part 2: Signed values: Convert each as indicated. 7. Decimal to Hexadecimal (1 byte, signed magnitude)...
Part 2: Signed values: Convert each as indicated. 7. Decimal to Hexadecimal (1 byte, signed magnitude)      a. -18      b. -41
How do I convert the integers in my 2D array list to output decimals numbers? My...
How do I convert the integers in my 2D array list to output decimals numbers? My program works accepting regular integers, but crashes when decimals are entered into my 2D array list. Can someone improve it so it accepts decimal numbers? Here is my code: import javax.swing.*; import java.io.File; import java.io.FileNotFoundException; import java.util.Scanner; public class TwoDimArray { private int numbers[][]; public TwoDimArray() { loadArray(); } public void loadArray() { /* //loadArray() method loads the users defined filename //@return returns the...
Convert signed integer 0xACE9 to binary and decimal. Convert unsigned integer0xACE9 to binary and decimal.
Convert signed integer 0xACE9 to binary and decimal. Convert unsigned integer0xACE9 to binary and decimal.
if hexadecimal number FA16 represent a signed number in signed magnitude, what the decimal representation of...
if hexadecimal number FA16 represent a signed number in signed magnitude, what the decimal representation of that number? include the sign for that number with no spaces between the number and sign. for example -3 or +3
Write a program that inputs three integers in the range [1..13] that represent a hand of...
Write a program that inputs three integers in the range [1..13] that represent a hand of three cards. Your program should output an English evaluation of the hand. In the output, cards will be described as follows: - 2–10 are described by the words for their numeric values: two, three, etc. - 1 is called an ace, 11 is called a jack, 12 is called a queen, and 13 is called a king. The evaluation of a hand is based...
For the first three sections assume unsigned integers. Convert to binary and hexadecimal 85 4563 Convert...
For the first three sections assume unsigned integers. Convert to binary and hexadecimal 85 4563 Convert from binary to decimal and hexadecimal. 0b1010 1011 0b0011 0001 Convert from hexadecimal to binary and decimal. 0xB2 0x11
what are the different ways you can represent the exact same design using: A.  VHDL B. ...
what are the different ways you can represent the exact same design using: A.  VHDL B.  state diagrams C. sequences
List the three different ways that mRNA splicing can give rise to different mRNA transcripts.
List the three different ways that mRNA splicing can give rise to different mRNA transcripts.
List and explain different ways a firm can raise capital. Include in your discussion the different...
List and explain different ways a firm can raise capital. Include in your discussion the different underwriting methods firms could use.
1. Name three different ways to explore stress management. Provide examples of each. 2. List at...
1. Name three different ways to explore stress management. Provide examples of each. 2. List at least 5 ways stress can affect your body as well as your emotions. 3. What 3 coping skills have you developed over time to help to manage stress? Give at least 2 references in APA format to support your EACH answer. Answers need to be at least 200 words with at least 2 substantial replies with at least 150 words. Give the question in...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT