Additions of two numbers by using 2’s complement, Computer Engineering

Assignment Help:

Add -20 to +26 by using 2's complement ?

Ans. Firstly convert the both numbers 20 and 26 in its 8-bit binary equivalent and determine the 2's complement of 20, after that add -20 to +26, that is,
               20 =  0 0 0 1 0 1 0 0 (that is 8-bit binary equivalent of 20)

              1627_Additions of two numbers by using 2’s complement.png= 1 1 1 0 1 0 1  1  (1's complement)
                                         +1
           -------------------------------

        1627_Additions of two numbers by using 2’s complement.png= -20 = 1 1 1 0 1 1 0 0 (i.e. 2's complement of 20)
               +26 = 0 0 0 1 1 0 1 0 (8-bit binary equivalent of 26)
           ----------------------------- Addition of -20 to +26
              = +6 = 0 0 0 0 0 1 1 0
           ----------------------------- Thus -20 to +26 = (6)10 = (0110)2.

 


Related Discussions:- Additions of two numbers by using 2’s complement

Program accept decimal number and convert it into given base, Q Develop a p...

Q Develop a program that accepts decimal number and converts it into given base. Fractional numbers are allowed and negative numbers are not allowed. Also check that entered number

Illustrate the advantages of encapsulation, Advantages of Encapsulation ...

Advantages of Encapsulation You can also delay the resolution of the details until after the design.  You can keep your code modular.

Representation scheme in artificial intelligence, Representation scheme in ...

Representation scheme in artificial intelligence: It is not hard to see why logic has been popular representation scheme in AI: In this way, It is easy to represent knowl

Shm, composition of two shm in right angles to each other to havingg time p...

composition of two shm in right angles to each other to havingg time period in the ratio 1:2

How does output caching work in asp.net, How does output caching work in AS...

How does output caching work in ASP.NET?    Output caching is a powerful method that enhances request/response throughput by caching the content generated from dynamic pages. O

Data dependency, Data Dependency:   It refers to the state in which two or ...

Data Dependency:   It refers to the state in which two or more instructions split same data. The instructions in a program can be given based on the relationship of data dependency

Perform subtraction in base 5 using r and r-1 complement, Q Write a menu dr...

Q Write a menu driven program to perform subtraction in base 5 using r and (r-1) complement with necessary validations.

Difference between latches and flip-flops based designs, What is the differ...

What is the difference between latches and flip-flops based designs Latches are level sensitive whether flip-flops are edge sensitive. So, latch based design and flop based des

Computer Graphics, Distinguish between uniform scaling differential scaling...

Distinguish between uniform scaling differential scaling

Adding momentum - sigmoid units, Adding Momentum - Sigmoid units: Howe...

Adding Momentum - Sigmoid units: However imagine a ball rolling down a hill as it does so then it gains momentum in which its speed increases and it becomes more difficult to

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