Skip to main content

Complement's

 For unsigned number computations, no need to add one more additional bit for computations or calculations.

But, while doing signed numbers computations (-ve numbers), Then we need to add one more bit for signed representation.

Then the total area, power, the cost will be more, due to increasing of area.

To solve this problem, the alternate method is "complements".

The complement is used for representing 'the negative decimal number in the binary form'. Different types of complement are possible of the binary number, but 1's and 2's complements are mostly used for binary numbers. 

Generally, they are r's and (r-1)'s complement is possible, but 

                                                                              r---> should be is even number 

Addition rules:


subtraction rules:





for subtractions :

the complements are registers, especially for converting signed numbers.

for signed numbers converting can be done by using either r's and (r-1)'s complements

Generally,1's complement and 2's complement,9's complement, and 10's complement are popular for doing subtractions.

1's complement :

1's complement is used for representing the negative decimal number in binary form. Different types of complement are possible of the binary number, but 1's and 2's complements are mostly used for binary numbers. We can find the 1's complement of the binary number by simply inverting the given number.

example :

For finding 1's complement of the given number, change all 0's to 1 and all 1's to 0. So, the 1's complement of the number 100110.1001 comes out 011001.0110.


Adding Positive & Negative Numbers   in Ones Complement



 1's Complement of Base-2 :

  •  All 0's become 1's
  • All,1's become,0's


example :

               (10110000)2 

               (01001111)2

        ans:1 1 1 1 1 1 1 1

2's complement :

2's complement is  the binary number by changing each bit(0 to 1 and 1 to 0) and adding 1 to the least significant bit.

example :

2's complement of binary number 1011001 is (0100110)+1=0100111.


Adding Positive Numbers in Twos Complement


Adding Positive Numbers in Twos Complement



Comments

Popular posts from this blog

Revision session

 10 Years Experienced Physical Design – Rapid Fire 100 Questions Interview Killer Revision Round (Senior / Lead Level) Use these for Qualcomm / Apple / NVIDIA / AMD / Intel / TSMC interviews. Answer in 1–3 lines, confident and practical. ⸻ Floorplan (1–15) 1. What is ideal utilization? No universal value; depends on macros, routing demand, node, timing target. Common start point high-60s to low-70s. 2. Why low utilization can also be bad? Wastes area, increases wirelength, hurts timing, higher die cost. 3. What is macro halo? Keepout around macro for routing/access/placement margin. 4. Channel spacing decided by? Pin density, expected traffic, metal stack, bus width. 5. Why macro orientation matters? Pin alignment and routing efficiency. 6. What makes floorplan good? Short critical paths, balanced whitespace, clean PG, low congestion risk. 7. Why place macros first? They dominate routing and topology. 8. Why edge macro placement common? Frees center for standard-cell routing. 9. Wh...

ERC :ELECTRICAL RULE CHECK

 Today's most important topic in Backend vlsi signoff stage       ERC (electrical rule check) ERC involves checking a design for all electrical connection. Checks such as well and substrate area for proper contact and spacing ,unconnected input or shorted output and one more Gates should not connect directly to supply (Must be connected through TIE high/low cells only) Floating gate errors ,if any gate is unconnected .This could lead to leakage issues. The well geometries need to be connected to power /ground and if PG Connection is not complete or if the pins are not defined ,the whole layout can report errors like"NWELL is not connected to VDD"

QUESTION&ANSWERS

  Q 1: What are the goals of Synthesis ? There are Mainly three goals of synthesis without changing the functionality Reduce the area (chip cost reduce) Increase performance Reduce the power Q 2: What are the Tech dependent inputs in PNR There are three main tech depended inputs Physical libraries    -->format is .lef     --->given by vendors Technology file       -->format is .tf       --->given by fabrication peoples TLU+ file                   -->format is .TLUP-->given by fabrication people Q 3: What are the Design dependent inputs in PNR There are six main design depended inputs Logical libraries      --> format is .lib    --->given by Vendors Netlist             ...