Creating a circuit to find the absolute value of a number

Discussion in 'Homework Help' started by bcurneen, Apr 19, 2009.

  1. bcurneen

    Thread Starter New Member

    Apr 19, 2009
    This is one of the questions on my homework assignment. I need to find the absolute value of a 4-bit binary number. I know that I don't need to do anything to the first 8 positive numbers to find the absolute value, but my problem is with the last 8 negative numbers. I know that I need to use two's complement to invert the bits and then add one. I am required to use four full adders, four multiplexers, and four inverters.

    Thanks for any help
  2. PRS

    Well-Known Member

    Aug 24, 2008
    It's been a long time since I've done these kinds of problems, but I can suggest a start: Use the inverters to get the 2's compliment then an adder to add 1. I'll sleep on the rest of it. Unfortunately I no longer have my Digital Logic book.
  3. Papabravo


    Feb 24, 2006
    I think you can use inverters to load a counter and clock it one time only. Then you have to examine the most significant bit of the orginal number and the 2's complement to see which one should be passed via a mux to the output.