|
Keith Barrow wrote: In computing - Three state logic.
Yeah, it's technically possible, but indeterminate boolean values make my skin crawl. They aren't even boolean, really.
Keith Barrow wrote: You've probably already used this without realising, nullable bit fields in SQL work along ternary logic lines.
And this is exactly why I hate them. You can have nullable bit fields, but you can also hit the server with a hammer, that doesn't make it a good idea. I'm sure there are some cases out there where this is useful, but I've only found it to be problematic. Every time I find nullable bit fields in a database, it's an issue that needs fixing rather than some clever use of three-state logic. If you need more than two values, why even use a bit field for that? Integers will do fine, and you won't have to deal with nulls.
Keith Barrow wrote: In formal logic there is also ternary logic, in one scheme:
+1: True
0: Unknown/ Indeterminate
-1: False
Yeah, but in general classical logics don't allow indeterminate values. True, false, or GTFO.
|
|
|
|
|
Rob Philpott wrote: -5v? I can't see how you can have tristate binary. What sort of logic was this?
Quantum computers use tri-state binary.
Jeremy Falcon
|
|
|
|
|
Yeah, perhaps out of scope of the original question.
Quantum computers do my head in. Witchcraft, I tell you!
Regards,
Rob Philpott.
|
|
|
|
|
I thought it was just a complex superposition of 2 states, which ends up giving you 3 dimensions to work in so you can get things like 30 degrees away from true.
|
|
|
|
|
Well, I'm still fuzzy on all of it, but from what I gather that's what it's intended to represent. But it still has to be stored somehow, the third state is a "indeterminate" flag to say it could be anything. But, it's still three states stored in the system.
Jeremy Falcon
|
|
|
|
|
Chuck Norris has a three-state one-two punch.
You'll never get very far if all you do is follow instructions.
|
|
|
|
|
There is a problem with ternary logic.
"Bit" is short for "binary digit".
What would you shorten "ternary digit" to?
The problem is equally terminological as technical!
PS. In the UK, I am aware that a tit is a kind of bird.
|
|
|
|
|
Quote:
PS. In the UK, I am aware that a tit is a kind of bird.
Amongst other things yes.
|
|
|
|
|
Vivic wrote: tit is a kind of bird
Nah, it's what birds have two of.
You'll never get very far if all you do is follow instructions.
|
|
|
|
|
That is true too. You just phrased it very well. I didn't figure out how to use 'bird' meaning 'girl'!
|
|
|
|
|
Vivic wrote: "Bit" is short for "binary digit".
What would you shorten "ternary digit" to?
"tet" of course!
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)
|
|
|
|
|
I find that offensive.
You'll never get very far if all you do is follow instructions.
|
|
|
|
|
Rob Philpott wrote: -5v? I can't see how you can have tristate binary. What sort of logic was this?
Its a matter of interpretation.
The physical characteristics are represented by a tristate value while the actual usage relies on two state values.
A more esoteric example is in RS 232 protocols where 1 and 0 are represented by how the slope of the electrical signal is moving.
You can google for the following to see pictorial representations of that.
rs232 falling edge
That said there is a idiom (or 'theory' maybe about 3 state logic) which is discussed in the following
http://en.wikipedia.org/wiki/Three-valued_logic[^]
|
|
|
|
|
That was some pretty good info. Thanks
|
|
|
|
|
As Ryan said it's all to do with the hardware, 0 or false tends to be a voltage value, it can be plus or minus depending on what is around it, due to the individual 'closeness' of conductors that are insulated from each other acting like capacitors. The actual what is 0 can be determined by looking at the data sheets. Very rarely is 0 actual 0 there tends to be an over lap due to tolerances in the components used on the board. RS232 gives a good version of this have a look at my article on serial comms it explains it.
Glenn
|
|
|
|
|
The answer is it depends. The signals sent are either RZ (Return to Zero Volts - I assume with a small error) or NRZ (Non-Return to Zero volts - a small voltage). I have no idea which the main in a typical PC bus uses, I assume RZ as it consumes less power and there is no need to detect if the signal is active.
[Edit]
See glenPattonPUB's reply - he knows what he's talking about.
Alberto Brandolini: The amount of energy necessary to refute bullshit is an order of magnitude bigger than to produce it.
|
|
|
|
|
Why, thanks kind sir!,[Yosser Mode] Gissa a job, electronics, I can do that![/Yosser Mode]
|
|
|
|
|
You can check the spec sheets for processors, generally these days they run on less than 5V, more like 3.3V or less. A range 0V through 1.5V will be treated as 0, and 1.5V to 3.3V will be treated as a 1.
Docs like this
[^]
will help (table 3 - min high level, max low level)
|
|
|
|
|
Both 0 and 1 in a chip are usually represented by a voltage rather than a current, because they're made out of FETs instead of BJTs.
Anyway, a closed transistor doesn't reach infinite resistance, not even the silicon oxide around it has infinite resistance, so you'll always have some non-zero voltage (and current).
|
|
|
|
|
Usually the logical levels are represented by voltages, not currents. You may have either active-higth or active-low signals, see Logic Level at Wikipedia[^].
THESE PEOPLE REALLY BOTHER ME!! How can they know what you should do without knowing what you want done?!?!
-- C++ FQA Lite
|
|
|
|
|
CPallini wrote: voltages, not currents
Yes, but can you have one without the other?
You'll never get very far if all you do is follow instructions.
|
|
|
|
|
Current Flows, Voltage is Pressure to use the water metaphor...
|
|
|
|
|
Yes, I know that, but it doesn't answer the question.
You'll never get very far if all you do is follow instructions.
|
|
|
|
|
Well Voltage 'dropped' across a component, it appears one side, a different value on the other side giving a difference in voltage that can be read with a meter in parallel. Current is the 'thing' (for want of a better word) moving through the circuit to measure it you have to break the path and insert the meter (there are other methods like coils etc. but...). So you can measure a voltage across something with out the being current flow (such as wires before plugging in). Bad explanation but the best I can manage at this time-O-day have a look at howstuffworks.com I seem to remember they had a very basic explanation. I'm off home!
|
|
|
|
|
That is not the point.
Logical levels are bound to voltages because electrical potential difference is the measured physical quantity.
For instance a car battery providing 8A to the vehicle lamps would have no higher logical level than four CR2032 cells providing 20 mA to a red LED (and its series resistor).
THESE PEOPLE REALLY BOTHER ME!! How can they know what you should do without knowing what you want done?!?!
-- C++ FQA Lite
|
|
|
|