Logic Gates -- What's the real story of how comparison is made?

Status
Not open for further replies.

Thread Starter

rbaulbin

Joined Jan 4, 2011
14
There is no something and nothing, just two different but "equal" states. The two states can be called red and black and it will still work, and yet red is NOT GREATER than black.
1) Will drop this thread after this last post

2) Red and black are not numbers. A computer is a number machine which is able to do calculations on numbers. You can't yield new quantities with something other than quantities to begin with. It deals with quantities, the fundamental ones being "something" and "nothing" (1 and 0) represented as presence and absence of voltage. It compares these quantities (1 > 0, by always yielding 1 in an XOR comparison) to yield higher quantities. Red and black combinations don't yield new quantities unless red and black themselves represent quantities. If 1 and 0 were equal states, or equal quantities, there'd be no capacity to count.

3) Wasn't trying to argue for argument's sake. I put up a valid non-philosophical, completely scientific informal proof of the idea that gates are doing a forced comparison in order to rebuff the concept that gates don't compare, which I think is a very useful concept for someone trying to understand what a computer is doing. Not at all trying to be antagonistic -- this entire thread has been very helpful -- it did tangentialize into this subargument concerning comparison, but I have no more to say on the topic.
 
Last edited:

Robin Mitchell

Joined Oct 25, 2009
819
rbaulbin, dude, stop over complicating things XD
I made a post here about two days ago, amazing how many replys there are :D

In some cases, just accept that it happens, i dont know why gravity bends time, i just acccept that it does :p
 

beenthere

Joined Apr 20, 2004
15,819
We shall have to agree to disagree as to gates making comparisons.
If 1 and 0 were equal states, or equal quantities, there'd be no capacity to count.
I might say that it would be more correct to state that there would be nothing to count. Nothing plus nothing is still nothing, but that says nothing about some ability or capacity to count.

The discussion keeps gliding up to extremely complex logic aggregation we call computers. While they are made of gates (in fact, every logic function possible can be done with nothing by NOR or NAND gates), gate level activity is simply a function of how the gate is made.
It compares these quantities (1 > 0, by always yielding 1 in an XOR comparison) to yield higher quantities.
That is simply not true at the gate level. An AND gate takes two "1" inputs and outputs a single "1" - hardly a higher quantity. A NAND gate takes the same inputs and yields a "0", thereby losing value. Even your XOR can lose value if two "1's" are at the input. That results in a "0".
A computer is a number machine which is able to do calculations on numbers.
It is a numeric engine that actually runs on numbers. Calculations are only a fraction of the possible functions.
You can't yield new quantities with something other than quantities to begin with.
That does not appear to make sense.
It deals with quantities, the fundamental ones being "something" and "nothing" (1 and 0) represented as presence and absence of voltage
Let's move up to a computer for this. I will take the old Univac computers as an example. If I have a number in the A register and a 20 instruction with a K value of 3 in the U register (with an address in the lower 15 bits of U) and issue 4 clock phases, the result will be storing the value on the A register into core menory at the address specified by those lower 15 bits in U.

The memory storage process involves transferring the contents of A into the X register and using the address in U to determine a unique storage location in 30 bits of core memory. You can see that there are quantities present, as in the number stored and the memory address, but the process of transferring data from A into X and then into core was controlled by a series of flip flops making a timing chain that issued control signal at appropriate times in order to effect the transfer and storage. There is more to it than quantity.
I put up a valid non-philosophical, completely scientific informal proof of the idea that gates are doing a forced comparison in order to rebuff the concept that gates don't compare
I am afraid you did nothing of the kind. If a gate were comparing inputs, the output would depend on the inputs being in states other than HIGH or LOW. Any time input A was less than input B would be a condition whereby the gate, doing a comparison, would take the output LOW, indicating that A was not equal to B, even though both A and B might be several volts above 0.

All logic families have stated voltage levels that make inputs valid. If an input is below one voltage level, it is a valid LOW. If above another, it is a valid HIGH. If at some level in between, it is undefined and invalid. A truth table is a statement of condition, not comparison.
 

kubeek

Joined Sep 20, 2005
5,794
. A computer is a number machine which is able to do calculations on numbers.
You got this wrong. Let´s take a binary adder as an example, 2x8bits in, 8 bits out. It adds numbers only because you made the logic in such way that if you say the two inputs represent numbers, you can call the output a number and it happens to be the two input values added.

But if the operation were XOR instead of ADD the inputs don´t have to be representing numbers. It could be for example actual states of some system going to one 8bit input and desired states to the other. The output then represents the difference between the two, for each pair of bits separately.

In other words, numbers are just an extension of originally strictly logic functions.
 

Thread Starter

rbaulbin

Joined Jan 4, 2011
14
I'm going to respond again, simply because others have taken the time to answer, and I find this topic genuinely constructive in helping to drill down to very specific terms used to describe electronic functionality.

With reference to the comparator chip thatoneguy mentioned, this chip uses nothing but gates to compare the magnitude of 2 inputs.

My question is: why is it not proper to say gates compare if that's what this chip does?
 

thatoneguy

Joined Feb 19, 2009
6,359
My question is: why is it not proper to say gates compare if that's what this chip does?
Look at the internal structure of a gate.

For a TTL inverter, the input is on the base of a transistor, and the output is on the collector, which is connected to power.

The transistor doesn't "compare" the input to ANYTHING, it simply responds in a predictable way when a voltage is applied to the base.

Adding more transistors in series or parallel results in AND/OR gates, all based on the action of a transistor.

To say logic gates compare inputs to create outputs is the same as saying an LED compares the anode voltage to the cathode voltage and "decides" to turn on.
 

beenthere

Joined Apr 20, 2004
15,819
I would think the point about function vs comparison has been made to death. A single gate does not compare anything with anything else.

I suppose the OP has his own reasons for a contrarian stance. The furtherance of this thread is not especially valuable.
 
Status
Not open for further replies.
Top