Combining gates

By Martin McBride, 2017-01-16
Tags: or gate and gate truth table
Categories: logic logic gates

We can combine two or more gates to perform more complex functions.

Combining gates

In this diagram, we have three inputs (A, B and C) and one output (Q). We are using an AND gate and an OR gate.

gate

We have also labelled the output of the AND gate as D. D is not an input, it is an intermediate value which we will use when calculating the truth table.

Truth table

Since this circuit has 3 inputs, the truth table will have 8 rows. Here is the basic truth table, with space for D and Q to be added:

table

D is equal to A AND B, so we can easily fill out the D column in the table. We just put 1 everywhere that A and B are both 1, and 0 everywhere else. Notice that D doesn't depend on C in any way:

table

Q is equal to D OR C, so we can now fill out the Q column in the table - the actual output of the combination gate. We just put 1 everywhere that either D or C are 1, and 0 everywhere else:

table

Video

See also

Sign up to the Creative Coding Newletter

Join my newsletter to receive occasional emails when new content is added, using the form below:

Popular tags

555 timer abstract data type abstraction addition algorithm and gate array ascii ascii85 base32 base64 battery binary binary encoding binary search bit block cipher block padding byte canvas colour coming soon computer music condition cryptographic attacks cryptography decomposition decryption deduplication dictionary attack encryption file server flash memory hard drive hashing hexadecimal hmac html image insertion sort ip address key derivation lamp linear search list mac mac address mesh network message authentication code music nand gate network storage none nor gate not gate op-amp or gate pixel private key python quantisation queue raid ram relational operator resources rgb rom search sort sound synthesis ssd star network supercollider svg switch symmetric encryption truth table turtle graphics yenc