Show the r’s complement, Electrical Engineering

Assignment Help:

Q. Show the r’s Complement?

Step1- get the (r-1)'s complement

Step 2- add 1 to the result ex.

           93510

                                    9 9 9

                                    9 3 5 -

                           0 6 4  (r-1)'s complement

                          0 6 4

                              1 +

                           0 6 5

  • When using the r's complement we add usually, and ignore any carry from the most significant digit (MSD)
  • If the result is in negative, it will be in r's complement form ex.

            395 - 210

210 is 789 + 1 = 790 in 10's complement form

            395

            790+

            185     

Why Use 2's Complement

  • The left-most bit is still a sign bit

            1  for negative

            0  for positive

  • One way to write 0

            +0 0000 0000

            -0  0000 0000  (how?)

  • With n bits we can represent -2n-1 to ( 2n-1 - 1)

Let's now consider the subtraction 22 - 35, again both represented as 7-bit numbers with a sign bit.

                        +22 in binary is:                 00010110
                        +35 in binary is:                 00100011
                        -35 in binary is:                  10100011
                        -35 in 1's complement is:    11011100

The sum to be calculated is now:

                                            00010110
                                         + 11011100
                                            11110010 

This time the addition does not produce a 9th bit, but the sign bit is 1. In this case it again tells us two things:

  • the answer is negative
  • the answer is represented in 1's complement notation

So to get the final answer we need to turn our answer into binary. If the 1's complement notation is 11110010 then the binary representation is 10001101 (note - the sign bit doesn't change, it's still a negative number!). This is the binary for -13, again, the correct answer.


Related Discussions:- Show the r’s complement

Explain in detail the operation of 8255 in mode 1, Explain in detail the op...

Explain in detail the operation of 8255 in mode1 taking suitable example. In mode1, Ports A and B are programmed as input or output ports and Port C is used for handshaking.

OCR, matlab code for handwritten digital

matlab code for handwritten digital

Compute the transfer function from the input, In this project we will consi...

In this project we will consider the control of a synchronous generator supplying electricity to the grid. We will focus on the problem of frequency stability. The frequency at whi

The input output system - stepper motor , The Input Output System The ...

The Input Output System The input output  system provides  the physical  connection between  the equipment  and the PLC there are many  different kinds  of I/O cards  which ser

Explain aas instructions in 8086 family, Explain AAS instructions in 8086...

Explain AAS instructions in 8086 family with example and their effect on flag. AAS: it is stands for ASCII adjust after subtraction; this is used to adjust the AX register l

Efficiency of shunt geranerator, A 100kw,230v,dc shunt generator,with Ra=0....

A 100kw,230v,dc shunt generator,with Ra=0.05,and Rf=57.5 has no load rotational loss(friction,wandage,core loss)of 1.8kw.compute a) The generator efficiency at full load.

Current through each resistor for the networking, Find the current through ...

Find the current through each resistor for the networking below using Mesh Analysis and Nodal Analysis.

Schematic symbols, Schematic Symbols The junction gate field-effect t...

Schematic Symbols The junction gate field-effect transistor or JFET gate is sometimes drawn in the middle of the channel (in place of at the drain or source electrode as in t

Compute l per unit length for plate, Q. The inductance per unit length in H...

Q. The inductance per unit length in H/mfor parallel plate in?nitely long conductors in air is given by L = µ 0 d/w = 4π×10 -7 d/w, where d and w are inmeters.Compute L (per unit

555 timer ic, i wanted the exact names of the components of the internal ci...

i wanted the exact names of the components of the internal circuit of a 555 timer ic

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd