Obtain 1''s and 2''s complement, Computer Engineering

Assignment Help:

Obtain 1's and 2's complement of 1010 using only four-digit representation.

Solution:

1's complement: 1's complement of 1010 is 

846_Obtain 1s and 2s complement.png

Please note that wherever you have a digit 1 in number then complement contains 0 for that digit and vice versa. In other words to get 1's complement of a binary number we only have to change all 1's of the number to 0 and all zeros to 1's. This can be done by complementing every bit of binary number.

2's complement: 

Adding 1 in 1's complement will produce 2's complement

493_Obtain 1s and 2s complement1.png

The 2's complement can also be getting by not complementing least significant zeros till first 1 is encountered. This 1 is also not complemented. After this 1 rest of all bits are complemented on left.

Consequently 2's complement of given number (using this method) must be (you can check it by obtaining 2's complement as we have done in the illustration).


Related Discussions:- Obtain 1''s and 2''s complement

There no polymorphic-type response, Why is there no polymorphic-type respon...

Why is there no polymorphic-type response from a create() or find() method? Ans) The EJB Specification forbids this behavior, and the weblogic.ejbc compiler checks for this beha

Explain pipelining, Define pipelining Pipelining is an efficient way of...

Define pipelining Pipelining is an efficient way of organizing concurrent activity in a computer system. The processor implements the program by fetching and implementing instr

What are the types of data warehouses, What are the types of data warehouse...

What are the types of data warehouses? Various types of data warehouses are illustrated below: a) Financial Data Warehouses b) Insurance Data Warehouses c) Human Resou

Define a socket, Define a socket? An application program interface give...

Define a socket? An application program interface gives the details of how can an application program interacts along with protocol software. But socket API is a defacto standa

Bresenham''s line drawing algorithm, what are advantages and disadvantages ...

what are advantages and disadvantages of bresenham''s line drawing algorithm?

Illustrate about packet switching, Q. Illustrate about Packet switching? ...

Q. Illustrate about Packet switching? Packet switching is used to avoid long delays in transmitting data over the network. Packet switching is a technique that limits the amoun

Explain the synchronous-transmission, A control character is sent at the be...

A control character is sent at the beginning as well as at the end of every block in the synchronous-transmission in order to  (A) Synchronize the clock of transmitter and rece

Define the most common biometrics, What is most common biometrics? Explain ...

What is most common biometrics? Explain in brief. The most common biometrics is as given below: Face geometry (Photo): The computer captures the picture of your face and m

Project cost, I need help in my M.Sc project ,but im wondering how the cost...

I need help in my M.Sc project ,but im wondering how the cost is calculated

What is class and class diagram, What is class, class diagram? An objec...

What is class, class diagram? An object is an instance of a class. Class explains a group of objects with similar properties (attributes), behaviour (operations), kinds of rela

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