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...

unlock surprise too see commands

                                  SynopsysTool Commands                                       How to add ndms in ref_libs Open block.tcl file Report_ref_libs information dump in a new tcl file Now go to icc2shell set_ref_libs -add missed ndm file---> from block.tcl file set_ref_libs -rebind link_block -force report_ref_libs save_block save_lib How to resolve upf error ? commit_upf save_block save_lib How to move ESD cell with origin coordinates ? move_objects [get_selection ] -to {7486.0965 3288.0000} How to select all the cells which have net name VDD_1V2_IO ?  change_selection [get_cells -of_objects [get_net VDD_1V2_IO]] Cmd for to check shorts  check_lvs -max_error 0 -checks short ----->for to check shorts How to add buffers add_buffer -lib_cell ec0cbf000an1n20x5 -new_cell_names 01122...

placement

  In a   VLSI design , floorplan is the crucial stage in which chip area, size and shape of the chip can be determined. Floorplan is iterative process. When designer is done with the floorplan, the next step is to run placement and optimization, after completion of placement and optimization designer would analyse the congestion map, cell density and timing reports, before moving to next stage i.e. Clock Tree Synthesis. This article discusses about the various approaches to reduce congestion and timing violation by modifying floorplan at block level. The design complexity is increasing as the number of transistors on a chip is increasing. So, in the   VLSI design flow , Physical design plays a very important role. Floorplanning is the starting step in the physical design flow. The main concern of floorplanning is to find the appropriate location of the module on the layout surface on the basis of interconnectivity. While determining the locations, one important check invo...