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

Metering standards, Metering Standards Relevant standards on metering ...

Metering Standards Relevant standards on metering are given in Table. Table: Relevant Metering Standards  Standards Description

Determine the stator current and power factor, A ¼-hp, 230-V, 60-Hz, four-p...

A ¼-hp, 230-V, 60-Hz, four-pole, single-phase inductionmotor has the following parameters and losses: R 1 = 10 , X l1 = X l2 = 12.5 ,R 2 = 11.5 , and X m = 250 . The core

Magnetic circuits, Magnetic circuits To  see  how  this   is  used   i...

Magnetic circuits To  see  how  this   is  used   in  practice, consider a coil of N turns wound onto a closed ring shaped former with a very high (note:    r (steel) = 200

Electronics, what is the difference between half &full wave rectifier

what is the difference between half &full wave rectifier

What is polarisation, What is polarisation? Explain. While a dielectric...

What is polarisation? Explain. While a dielectric material is related an electric field the dipoles of the material find oriented in a certain direction under the effect of the

For zero flag , For zero flag  CZ ( Call  on Zero )  CNZ ( Call on no...

For zero flag  CZ ( Call  on Zero )  CNZ ( Call on no zero ) Instructions CZ call the  subroutine  from the  specified  memory location if zero flag is set  (Z=1). The i

What is the photon flux - focal spot isotropically, Suppose that the x rays...

Suppose that the x rays are emitted from a focal spot isotropically. The photon flux is 3.28 x 10 6 photons mm -2 sec -1 at a distance of 0.75 m from the focal spot. What is the

Find the voltage , 1. Find the current through each component, in pola...

1. Find the current through each component, in polar form, using mesh analysis. The source voltages are rms with an angle of 0 degrees. 2. Find the current t

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