All the possibilities of the input and output are shown in it and hence the name truth table is kept. In logic problems such as Boolean algebra and electronic circuits, truth tables are commonly used. These are used to make logic circuits. Logic gates are the main components of any digital system. This electrical circuit can have only one output and 1 or more inputs. The relation between the input and the output is governed by specific logic.
The logic multiplication rules are used to operate an AND gate. If any of the inputs are low 0 , the output is also low in this gate. When all of the inputs are high 1 , the output will be high as well. If neither of the inputs is high, the result is a low output 0.
In the same way that an AND gate can have an unlimited number of input probes, an OR gate can only have one output probe. A logical OR gate finds the maximum between two binary digits. Logical circuit:. Privacy Center Careers Request a Demo.
Back to Basics: What is Boolean Logic? November 5, What is Boolean Logic? Learn more about a DMP in this short video: Want to learn more? If you arrange the gates correctly, they will remember an input value. This simple concept is the basis of RAM random access memory in computers, and also makes it possible to create a wide variety of other useful circuits.
Memory relies on a concept called feedback. That is, the output of a gate is fed back into the input. The simplest possible feedback circuit using two inverters is shown above. If you follow the feedback path, you can see that if Q happens to be 1, it will always be 1.
If it happens to be 0, it will always be 0. Since it's nice to be able to control the circuits we create, this one doesn't have much use -- but it does let you see how feedback works. It turns out that in "real" circuits, you can actually use this sort of simple inverter feedback approach. A more useful feedback circuit using two NAND gates is shown below:. This circuit has two inputs R and S and two outputs Q and Q'. Because of the feedback, its logic table is a little unusual compared to the ones we have seen previously:.
There is also the funny illegal state. In this state, R and S both go to 0, which has no value in the memory sense. Because of the illegal state, you normally add a little conditioning logic on the input side to prevent it, a s shown here:. In this circuit, there are two inputs D and E.
You can think of D as "Data" and E as "Enable. If E changes to 0, however, Q will remember whatever was last seen on D. A circuit that behaves in this way is generally referred to as a flip-flop. A very common form of flip-flop is the J-K flip-flop.
It is unclear, historically, where the name "J-K" came from, but it is generally represented in a black box like this:. The 1-to-0 notation means that when the clock changes from a 1 to a 0, the value of J and K are remembered if they are opposites.
At the low-going edge of the clock the transition from 1 to 0 , J and K are stored. However, if both J and K happen to be 1 at the low-going edge, then Q simply toggles. That is, Q changes from its current state to the opposite state. You might be asking yourself right now, "What in the world is that good for?
The fact that J-K flip-flop only "latches" the J-K inputs on a transition from 1 to 0 makes it much more useful as a memory device. J-K flip-flops are also extremely useful in counters which are used extensively when creating a digital clock. Here is an example of a 4-bit counter using J-K flip-flops :. The outputs for this circuit are A, B, C and D, and they represent a 4-bit binary number. Into the clock input of the left-most flip-flop comes a signal changing from 1 to 0 and back to 1 repeatedly an oscillating signal.
The counter will count the low-going edges it sees in this signal. That is, every time the incoming signal changes from 1 to 0, the 4-bit number represented by A, B, C and D will increment by 1. So the count will go from 0 to 15 and then cycle back to 0. You can add as many bits as you like to this counter and count anything you like.
For example, if you put a magnetic switch on a door, the counter will count the number of times the door is opened and closed. If you put an optical sensor on a road, the counter could count the number of cars that drive by.
In this arrangement, the value on D is "latched" when the clock edge goes from low to high. Unlike the previous operators, a negation is a unary operator, it takes in one input and outputs one output.
These operators can be made from the elementary operators. You may have come across some of the symbols used to represent them in other areas of maths before, their relationship will be explained further in the sections below.
As explained in the section dealing with the OR Disjunction operator, in boolean algebra, or means one, the other or both in contrast to the common meaning which is one or the other, in boolean algebra, the XOR operator means this.
It is like the disjunction except if both inputs are true, it outputs false i. The implication outputs true as long as both inputs are the same and the second input can still be true if the first input is false.
Unlike the conjunction and disjunction operators, it is not commutative. The sufficiency is similar the implication, however the second input cannot be true if the first input is false and the second input may not be true if the first input is.
Like the implication operator, it is not commutative. If you are swapping the order of the inputs you must change the direction the arrow faces. Each binary operator has an analogous operation in set theory. The laws mentioned above are also valid, especially De Morgan's laws. The relational operators used in arithmetic and algebra such as equals, greater than etc. Equals forms an equation.
0コメント