Propositional Logic

Building With Logic Gates


Remember, XOR stands for "exclusive or," and for each gate if the input consists of a single 00 and a single 1,1, then the output is 1,\bf1, otherwise the output is 0\bf0.

You want this set of logic gates with inputs A,A, B,B, and C,C, to output Z=1 Z = 1 only if there's an odd number of inputs that equal 1.1.

What kind of gate should go at the question mark?

A palindrome reads the same forwards and backwards. (For example, 10101 and 1001 are palindromes.) Suppose you want a machine that takes a number with the four binary digits A, B, C, and D and outputs a 1 only if the number is a palindrome.

You can build this with two XOR gates, one NOT gate, and which other extra kind of gate?

Suppose you want a machine that takes a binary number with four digits A, A, B, B, C, C, and D D and outputs 11 if the number is even. How many logic gates does this require?

Note: 00 is even.

A binary number is a number written in base 2.2. These numbers are similar to "normal" numbers, but they only use the digits 00 and 11 and are based on powers of 22 rather than powers of 10.10. For example, a "normal" base-1010 arithmetic example would be something like 123410=1103+2102+3101+4100.1234_{10} = 1 \cdot 10^3 + 2 \cdot 10^2 + 3 \cdot 10^1 + 4 \cdot 10^0. Here's a different number, but in binary: 11102=123+122+121+020=1410.1110_2 = 1 \cdot 2^3 + 1 \cdot 2^2 + 1 \cdot 2^1 + 0 \cdot 2^0 = 14_{10}.

You are designing a calculator display with digits like the ones shown above.

Consider the logic gates leading to the portion of the display marked:

The inputs are binary four digit numbers represented by the digits A, A , B, B , C, C , and D. D .

Which gates go in the red boxes?

Logic gates are used by computers to perform all sorts of operations, but designing the circuits can be tricky. We'll tackle addition of numbers (which requires many gates) in a later quiz, but for now let's consider a simpler problem:

We would like a machine that takes three inputs A, B, and C and returns 1 if and only if all the inputs are 1.

This can be done with two logic gates that are identical. Which type of logic gate works?


Problem Loading...

Note Loading...

Set Loading...