# Can Some One Explain To Me This Prom Circuit

• Engineering
• transgalactic
In summary, the table in PROM #1 is used to implement a 2's complement circuit, but it is incorrect and only works for positive numbers. In PROM #2, the table is correct, but the last three lines are not executed.

#### transgalactic

i need to implement a circuit that has 8 bit input number
and its output is the complement two of this number.
i need to implement it using
2^5 X 4 2^4X4 proms
here is the solution:
http://s290.photobucket.com/albums/ll279/t...nt=IMG_8819.jpg

but i can't understand how they constructed these tables??

why there is a data line goes into the address line of another prom?

The data line is the carry for when you do the sum at the end...
Two's complement works by doing a logic 'not' on each bit and then adding '1' to the sum.
You'll need the carry bit, as it's two four bit words.
I think the fifth bit (A4) in the second array is to show its a negative or positive number but isn't applied.
The first bit is tied to the input as its always the same if its posiitve or negative.
Hope that helps.

but this is not a half adder component this is prom
we don't need to do math in proms
we have for each address a data .
i was told some thing else if you could explain it to me:
"
In PROM #1, the first 5 lines look like the output is the two's complement of the input, but drops the lowest bit. The last 3 lines don't look right though.
However, they will apparently never be executed.

In PROM #2, it looks the same except the last 3 lines are correct as well.

The D3 output of PROM #1 is sort of like a carry output of an adder.
The equivalent input for the most significant bit is always 0. So when you invert it, it should always be a 1. The only way it is a zero is when you do the second half of two's complement (increment by 1), if it has a carry. So that bit acts like a reverse carry. It is 1 if nothing carried out, and 0 is something did.

If you look at the PROM #2, you will notice that it needs a reverse carry since if the A0 is 1 and goes to 0, it actually adds 1.
"

Yes...i agree about the maths but just saying what is obvious from the table only...

Have you tried sticking the truth table into the simulator if there is one in the software?

really, with the last three lines being incorrect as a two's complement, its highly likely then that negative numbers aren't important.

What seems obvious from the three peices of data given is the following set conditions:-

if A4 is 1,

then the output returns a value depending on two conditions.

a) 1st condition is that its less than the highest value (ie. less than 1111 1111)
as in the two values that returned the same answer

and

b) the 2nd condition is that its the highest value. (ie. it is 1111 1111)