ONLINE ELECTRICAL ENGINEERING STUDY SITE

1′s Complement

We are now familiar with the basics of various number systems used in digital electronics. Now let us quickly look through the main number system which is binary number system. In binary number system 0 & 1 can represent all the numbers. Before discussing about 1's complement let us first look at some different things. Let us look through the numbers from 0 to 7 octal number Now we have given this as an example to illustrate the representation of binary numbers. This is done to represent the positive numbers. But what if we want to represent the negative numbers in binary number system.

The concept of negative sign is not there in binary number system. Although there have been disputes about representing negative numbers in binary number system. And for it various methods have been developed. The most popular of them all are 1's complement and 2's complement. Though 2's complement dominates the 1's complement in popularity but this is also used because of somewhat simpler design in hardware due to simpler concept. Now we will look at the method of 1's complement.

Number Representation

1's complement is a very easy method for representing negative numbers in binary number system. To represent any number which is negative first we have to consider the binary value of its positive magnitude in binary system, then we have to simply convert the 1’s with 0 and the 0s with 1 and we will get the 1's complement of that number which is also the negative value of that number. As we can see that this method is truly a method of complementing. We will have a clear idea if we look at some examples. Example First let us consider the positive numbers from 0 -7 octal number Now the 1's complement of these numbers will be like as follows 1s-complement Subtraction using 1's complement The method of binary subtraction becomes very easy with the help of 1's complement. Now let us look at an example to understand subtraction using 1's complement. Suppose A = (5)10 = (0 1 0 1)2 And B = (3)10 = (0 0 1 1)2 And we want to find out A - B For this first we have to calculate 1's complement of B 1's complement of B = 1 1 0 0 Now we have to add the result with A  Now in the result we can see that there is an overflowing bit which we have to add with the remaining result  This is the desired result. And when there will not be any overflowing digit the result obtained in the previous stage will be the answer.

Closely Related Articles Binary Number System | Binary to Decimal and Decimal to Binary ConversionBinary to Decimal and Decimal to Binary ConversionBCD or Binary Coded Decimal | BCD Conversion Addition SubtractionBinary to Octal and Octal to Binary ConversionOctal to Decimal and Decimal to Octal ConversionBinary to Hexadecimal and Hex to Binary ConversionHexadecimal to Decimal and Decimal to Hexadecimal ConversionGray Code | Binary to Gray Code and that to Binary ConversionOctal Number SystemDigital Logic Gates2′s ComplementASCII CodeHamming Code2s Complement ArithmeticError Detection and Correction Codes9s complement and 10s complement | SubtractionSome Common Applications of Logic GatesKeyboard EncoderAlphanumeric codes | ASCII code | EBCDIC code | UNICODEMore Related Articles Digital ElectronicsBoolean Algebra Theorems and Laws of Boolean AlgebraDe Morgan Theorem and Demorgans LawsTruth Tables for Digital LogicBinary Arithmetic Binary AdditionBinary SubtractionSimplifying Boolean Expression using K MapBinary DivisionExcess 3 Code Addition and SubtractionK Map or Karnaugh MapSwitching Algebra or Boolean AlgebraBinary MultiplicationParallel SubtractorBinary Adder Half and Full AdderBinary SubstractorSeven Segment DisplayBinary to Gray Code Converter and Grey to Binary Code ConverterBinary to BCD Code ConverterAnalog to Digital ConverterDigital Encoder or Binary EncoderBinary DecoderBasic Digital CounterDigital ComparatorBCD to Seven Segment DecoderParallel AdderParallel Adder or SubtractorMultiplexerDemultiplexer555 Timer and 555 Timer WorkingOR Operation | Logical OR OperationAND Operation | Logical AND OperationLogical OR GateLogical AND GateNOT GateUniversal Gate | NAND and NOR Gate as Universal GateNAND GateDiode and Transistor NAND Gate or DTL NAND Gate and NAND Gate ICsX OR Gate and X NOR GateTransistor Transistor Logic or TTLNOR GateFan out of Logic GatesINHIBIT GateNMOS Logic and PMOS LogicSchmitt GatesLogic Families Significance and Types of Logic FamiliesLatches and Flip FlopsS R Flip Flop S R LatchActive Low S R Latch and Flip FlopGated S R Latches or Clocked S R Flip FlopsD Flip Flop or D LatchJ K Flip FlopMaster Slave Flip FlopRead Only Memory | ROMProgrammable Logic DevicesProgrammable Array LogicApplication of Flip FlopsShift RegistersBuffer Register and Controlled Buffer RegisterData Transfer in Shift RegistersSerial In Serial Out (SISO) Shift RegisterSerial in Parallel Out (SIPO) Shift RegisterParallel in Serial Out (PISO) Shift RegisterParallel in Parallel Out (PIPO) Shift RegisterUniversal Shift RegistersBidirectional Shift RegisterDynamic Shift RegisterApplications of Shift RegistersUninterruptible Power Supply | UPSConversion of Flip FlopsNew Articles Water MeterAir MeterDigital PotentiometersBasic Construction of Wind TurbineCharacteristics of Sensors