Even though CAD tools are used to create combinational logic circuits in practice, it is important that a digital designer should learn how to generate a logic circuit from a specification. Understanding this process allows the designer to better use the CAD tools, and, if need be, to design critical logic sub-circuits by hand.

The design procedure for combinational logic circuits starts with the problem specification and comprises the following steps:

- Determine required number of inputs and outputs from the specifications.
- Derive the truth table for each of the outputs based on their relationships to the input.
- Simplify the boolean expression for each output. Use Karnaugh Maps or Boolean algebra.
- Draw a logic diagram that represents the simplified Boolean expression. Verify the design by analysing or simulating the circuit.

Design a circuit that has a 3-bit binary input and a single output (Z) specified as follows:

- Z = 0, when the input is less than 5
_{10} - Z = 1, otherwise

### Determine the inputs and Outputs

- Label the inputs (3 bits) as A, B, C
- A is the most significant bit
- C is the least significant bit

- The output (1 bit) is Z
- Z = 1 -> 101
_{2}, 110_{2}, 111_{2} - Z = 0 -> other inputs

- Z = 1 -> 101

- Label the inputs (3 bits) as A, B, C
### Derive the Truth Table

### Simplify the Boolean Expression

From the truth table, we use one of the following 2 methods to obtain the simplified boolean expression

- Use Karnaugh Map to minimise the logic or
- From the truth table, get the Canonical Sum of Products boolean expression.

Z = A * ~B * C + A * B * ~C + A * B * C

Use Boolean Algebra to simplify the boolean expression to:

**Z = (B + C) * A**

### Draw the logic diagram

Draw a logic diagram that represents the simplified Boolean expression. Verify the design by analysing or simulating the circuit.

Design a BCD to 7 segment decoder circuit for segment e that has a 4-bit binary input and a single output (7e) specified by the truth table

### Determine the inputs and Outputs

- Label the inputs (4 bits) as A, B, C, D
- D is the most significant bit
- A is the least significant bit

- The output (1 bit) is 7e - segment e of 7 segment display

- Label the inputs (4 bits) as A, B, C, D
### Derive the Truth Table

Obtained from the BCD to 7 segment decoder truth table. Note that 7e is obtained from column e.

### Simplify the Boolean Expression

From the truth table, we use one of the following 2 methods to obtain the simplified boolean expression

- Use Boolean Algebra to simplify the Canonical Sum of Products boolean expression obtained from the truth table or
- Use Karnaugh Map to minimise the logic. From the Karnaugh Map, we obtained the following boolean expression:

**7e = ~D*B*~A + ~C*~B*~A**

### Draw the logic diagram

Draw a logic diagram that represents the simplified Boolean expression. Verify the design by analysing or simulating the circuit.

A bank wants to install an alarm system with 3 movement sensors.

To prevent false alarms produced by a single sensor activation, the alarm will be triggered only when at least two sensors activate simultaneously.

Design a circuit that has a 3-bit binary input and a single output that

- output 1 if it is a prime number. eg 2
_{10}, 3_{10}, 5_{10}, 7_{10} - otherwise output 0.

Given two input bits A and B, produce three outputs X, Y, and Z so that

- X is 1 only when only when A > B,
- Y is 1 only when A < B, and
- Z is 1 only when A = B