Introduction to Karnaugh Maps - Combinational Logic Circuits, Functions, & Truth Tables

The Organic Chemistry Tutor
1 Mar 201929:43

Summary

TLDRThis video script offers a comprehensive guide on utilizing Karnaugh maps (K-maps) to simplify the process of writing Boolean functions and creating corresponding circuit diagrams. It demonstrates how to translate truth tables into K-maps for two, three, and four variables, emphasizing the importance of grouping ones in powers of two. The script also illustrates the process of deriving functions from K-maps and testing their accuracy, followed by constructing logic circuits based on the simplified functions. The tutorial encourages viewers to practice by pausing and attempting examples themselves, highlighting the efficiency of K-maps in digital logic design.

Takeaways

  • πŸ“Š The script discusses the process of using a Karnaugh map (K-map) to simplify and represent Boolean functions based on a truth table.
  • πŸ” It explains how to create a three-variable K-map with eight squares, corresponding to the eight possible input combinations of variables a, b, and c.
  • πŸ“ The importance of correctly placing the function values within the K-map squares is highlighted, which aligns with the truth table's output for each combination of inputs.
  • πŸ”— The concept of circling groups of ones in the K-map is introduced, emphasizing that the number of ones circled must be a power of two (1, 2, 4, 8, etc.).
  • πŸ€” The script illustrates how to derive Boolean expressions from the K-map by identifying variables that do not change within each group of circled ones.
  • πŸ› οΈ It demonstrates the conversion of a K-map into a circuit diagram, showing the use of AND and OR gates to represent the simplified Boolean function.
  • πŸ”„ The video provides examples of both horizontal and vertical orientations for a three-variable K-map, as well as a four-variable K-map for more complex functions.
  • πŸ“ The process of filling out a K-map with function values for different variable combinations is detailed, including how to handle the complements of variables.
  • πŸ”‘ The script explains how to test the derived Boolean function by substituting variable values and verifying the output against the truth table.
  • πŸ” It also covers the reverse process of creating a K-map from a given Boolean function, showing how to place ones and zeros in the appropriate squares.
  • πŸ’‘ Finally, the video encourages viewers to practice by pausing and attempting to create K-maps and circuit diagrams from provided truth tables or functions.

Q & A

  • What is a Karnaugh map and how is it used in logic design?

    -A Karnaugh map, often abbreviated as K-map, is a visual tool used to simplify Boolean algebra expressions and to minimize logic circuits. It is used to represent the truth table of a Boolean function in a more compact form, making it easier to identify patterns and simplify the function into its simplest form.

  • How many squares are needed for a three-variable Karnaugh map?

    -A three-variable Karnaugh map requires 2^3, which equals 8 squares, to represent all possible combinations of the three binary variables.

  • What is the significance of the arrangement of rows and columns in a three-variable Karnaugh map?

    -In a three-variable Karnaugh map, the arrangement of rows and columns corresponds to the binary values of the variables. For instance, if the variables are A, B, and C, the rows might represent A and B, while the columns represent C, allowing for a systematic representation of all possible input combinations.

  • How do you determine the function values to be placed in a Karnaugh map?

    -The function values are determined from the truth table of the Boolean function. Each cell in the Karnaugh map corresponds to a specific combination of input variables, and the value placed in that cell is the output of the function for that combination.

  • What is the rule for circling groups of ones in a Karnaugh map?

    -When simplifying a Karnaugh map, you circle groups of ones (representing TRUE or 1 in the function) together. The number of ones in a group must be a power of two, such as 1, 2, 4, or 8, because this allows for the simplest representation of the function in terms of AND and OR operations.

  • How do you interpret the groups of ones in a Karnaugh map to write the simplified Boolean function?

    -Each group of ones in a Karnaugh map corresponds to a term in the simplified Boolean function. You write down the variables that do not change within the group, and if a variable changes, you use its complement. The terms for all groups are then combined using OR operations.

  • What is the purpose of a circuit diagram in the context of Karnaugh maps?

    -A circuit diagram is used to visually represent the physical implementation of a Boolean function. After simplifying a Boolean function using a Karnaugh map, the circuit diagram shows how to connect logic gates (AND, OR, NOT) to achieve the desired output.

  • Can you provide an example of how to convert a simplified Boolean function into a Karnaugh map?

    -Certainly. If you have a simplified Boolean function like 'A BC + AB', you would create a Karnaugh map and fill in the cells where A is 1 and C is 1 for the term 'AC', and where A is 1, B is 0 for the term 'AB'. The filled cells represent the TRUE outputs of the function for the respective variable combinations.

  • What is the difference between a horizontal and a vertical orientation of a three-variable Karnaugh map?

    -The difference lies in how the variables are assigned to the rows and columns. In a horizontal orientation, one pair of variables is assigned to the rows, and the third variable to the columns. In a vertical orientation, it's the opposite, with one variable assigned to the columns and the pair of variables to the rows. The choice of orientation can affect the ease of simplifying the function.

  • How do you handle a four-variable Karnaugh map?

    -A four-variable Karnaugh map requires 2^4, or 16 squares, arranged in a 4x4 grid. Two variables are assigned to the rows and the other two to the columns. You fill in the map based on the function's truth table and then circle groups of ones to simplify the function, similar to the process with three-variable maps.

  • Can you explain the process of creating a circuit diagram from a simplified Boolean function?

    -To create a circuit diagram from a simplified Boolean function, you identify each term in the function that requires an AND operation and represents it with an AND gate. Then, you use OR gates to combine the outputs of these AND gates to represent the OR operations in the function. NOT gates may be used if any term involves a variable's complement.

Outlines

00:00

πŸ“Š Introduction to Karnaugh Maps and Truth Tables

This paragraph introduces the concept of Karnaugh maps (K-maps) as a tool for simplifying the process of writing functions based on truth tables. It explains the structure of a three-variable K-map with eight squares, each representing different input possibilities. The paragraph details how to fill in the K-map with function values from the truth table and emphasizes the importance of circling groups of ones in powers of two to simplify the function. It also provides an example of deriving a function from the K-map by identifying variables that do not change within these groups.

05:02

πŸ” Testing the Function and Circuit Diagram Creation

The second paragraph continues the discussion by testing the derived function against specific variable values to ensure its correctness. It then proceeds to convert the function into a circuit diagram, explaining the use of AND and OR gates to represent the logical operations of the function. The paragraph also encourages viewers to pause and attempt the problem themselves, introducing a new example with a different K-map orientation and explaining how to fill it out based on the given truth table.

10:04

πŸ›  Vertical Orientation K-Map and Function Derivation

This paragraph focuses on creating a K-map with a vertical orientation, explaining the process of filling it out based on the given function values. It demonstrates how to identify pairs of ones and derive the function by considering variables that remain constant within these pairs. The paragraph also includes testing the derived function with different variable combinations to validate its accuracy and concludes with the conversion of the function into a logic circuit diagram.

15:05

πŸ”„ Four-Variable K-Map Analysis and Function Construction

The fourth paragraph extends the concept to four-variable K-maps, guiding the viewer through the analysis of pairs of ones and the construction of a function based on constant variables within these pairs. It illustrates the process of selecting terms and building the function step by step, emphasizing the independence of certain variables for each selection. The paragraph also encourages practice by inviting the viewer to try another example with a four-variable K-map.

20:06

πŸ“š Converting Functions into K-Maps for Different Variable Combinations

This paragraph demonstrates how to create K-maps from given functions for both three-variable and four-variable scenarios. It explains the process of identifying where variables are constant or complementary within the function terms and placing ones accordingly in the K-map. The paragraph provides examples of functions with different variable combinations and guides the viewer through the process of filling out the corresponding K-maps.

25:07

🎨 Advanced K-Map Filling with Color Coding

The final paragraph presents a more complex example of filling out a four-variable K-map based on a given function. It introduces color coding to distinguish between different terms in the function and explains the significance of the number of ones corresponding to the number of variables in each term. The paragraph concludes by summarizing the method for turning a function into a K-map and thanks the viewer for watching.

Mindmap

Keywords

πŸ’‘Truth Table

A truth table is a mathematical table used in logic to determine the truth value of logical expressions based on the truth values of the inputs. In the video, truth tables are used to represent the different input possibilities for variables a, b, and c, and to determine the corresponding function values. For example, the script describes how to fill out a truth table for a function with three variables, where each row represents a unique combination of inputs for a, b, and c, and the last column shows the function's output for those inputs.

πŸ’‘Karnaugh Map (K-Map)

A Karnaugh Map is a graphical representation used to simplify boolean algebra expressions. It is a valuable tool in digital logic design for minimizing the complexity of a circuit. The video explains how to create a K-Map from a truth table and vice versa. For instance, the script mentions a three-variable K-Map with eight squares, each corresponding to an input possibility, and demonstrates how to fill in the K-Map based on the function values from the truth table.

πŸ’‘Variables

In the context of logic and the video, variables represent the inputs to a logical function, which can take on values of 0 or 1. The script discusses variables a, b, and c, and their different combinations that result in various output values. The variables are essential for constructing both the truth table and the K-Map, as they define the rows and columns of these tools.

πŸ’‘Function Value

The function value is the output of a logical function given a specific set of input values. The video script describes how to place these values into the appropriate squares of a K-Map, which then helps in simplifying the function. For example, when a, b, and c are 0, 0, and 0 respectively, the function value might be 0, which is placed in the corresponding square of the K-Map.

πŸ’‘Boolean Algebra

Boolean algebra is a branch of algebra dealing with binary variables and logical operations such as AND, OR, and NOT. The video uses Boolean algebra to simplify expressions derived from K-Maps. The script explains the process of converting the grouped ones in a K-Map into a simplified Boolean expression, which represents the original function in a more streamlined form.

πŸ’‘Complement

In logic, the complement of a variable is the inverse of its value. If a variable is 0, its complement is 1, and vice versa. The script uses the concept of complements when discussing how to fill out a K-Map and simplify Boolean expressions. For example, if a certain variable is consistently 1 for a group of ones in a K-Map, its complement (0) is used in the simplified Boolean expression.

πŸ’‘Circuit Diagram

A circuit diagram is a graphical representation of an electrical circuit. It shows the components of the circuit and their interconnections. The video script explains how to translate a simplified Boolean function into a circuit diagram, using logic gates like AND and OR gates. The script provides examples of how to create a circuit diagram based on the function derived from a K-Map.

πŸ’‘AND Gate

An AND gate is a digital logic gate that outputs true or 1 only when all its inputs are true or 1. The video script describes using AND gates in circuit diagrams to represent terms in Boolean expressions that require certain conditions to be met simultaneously. For example, the term 'b AND NOT c' would require an AND gate with inputs b and the complement of c.

πŸ’‘OR Gate

An OR gate is a digital logic gate that outputs true or 1 when at least one of its inputs is true or 1. In the video, OR gates are used in circuit diagrams to combine outputs from other logic gates, representing terms in Boolean expressions that require any of a set of conditions to be met. The script mentions using an OR gate to combine the outputs of AND gates to produce the final function output.

πŸ’‘Simplification

Simplification in the context of the video refers to the process of reducing a Boolean expression to its simplest form using techniques such as K-Maps. The script demonstrates how to simplify expressions by grouping ones in a K-Map and then translating these groups into a minimized Boolean expression, which can then be used to design more efficient circuit diagrams.

Highlights

Introduction to using a Karnaugh map (K-map) to simplify and write a function based on a truth table.

Explanation of a three-variable K-map with eight squares representing all input possibilities.

Method to fill a K-map with function values from a truth table.

Technique for grouping ones in a K-map to simplify the function.

Rule of grouping ones in powers of two (1, 2, 4, 8, etc.) for K-map simplification.

Deriving a function from a K-map by identifying variables that do not change within a group of ones.

Example of testing the derived function against the truth table for accuracy.

Conversion of the simplified function into a circuit diagram using AND and OR gates.

Demonstration of creating a K-map with a vertical orientation for a three-variable function.

Process of filling a vertical K-map by analyzing the function values for different variable combinations.

Strategy for selecting groups of ones in a vertical K-map to form a simplified function.

Application of the derived function to create a logic circuit diagram.

Introduction to a four-variable K-map and its analysis for function simplification.

Method for identifying constant variables within groups of ones in a four-variable K-map.

Example of converting a given function into a K-map for educational purposes.

Step-by-step guide to creating a three-variable K-map from a function with terms.

Complex example of creating a four-variable K-map from a function with multiple terms.

Final example demonstrating the coloring and selection process in a four-variable K-map.

Conclusion summarizing the process of turning functions into K-maps and circuit diagrams.

Transcripts

play00:01

consider the truth table shown on the

play00:03

screen

play00:04

how can we take the data in its truth

play00:06

table and write a function using the

play00:09

variables a b and c

play00:12

enter carnot maps

play00:14

the karnaugh map will be very helpful

play00:16

for us to

play00:17

write a function that describes this

play00:19

truth table

play00:21

so we have three variables so we need a

play00:23

three variable karnaugh map with eight

play00:25

squares

play00:27

now the eight squares will match the

play00:29

eight different input possibilities that

play00:31

we have here

play00:36

so this is just one of the two ways in

play00:38

which we can draw a three variable

play00:40

cardinal map

play00:43

so we're going to have two rows

play00:45

and four columns

play00:50

so on top i'm going to put

play00:52

for the inputs a b on the bottom c

play00:56

so now the inputs a b

play00:58

it could be 0 0

play01:00

0 1

play01:01

1 1

play01:02

and 1 0. now the input for c

play01:05

is only 0 or 1.

play01:08

now the values that we're going to put

play01:10

inside the square are the function

play01:12

values that we see here

play01:15

so for this first square a b is 0 and c

play01:18

is 0

play01:19

which corresponds to a function value of

play01:22

0.

play01:25

now for the next one

play01:26

a b is still zero which means we're

play01:28

dealing with this column

play01:30

and c is one so we're dealing with this

play01:32

particular square

play01:34

the function value for that

play01:36

is still zero

play01:43

now for the third row

play01:45

we can see that a b

play01:47

is 0 1

play01:49

and

play01:50

c

play01:51

is 0

play01:53

and the function value is 1 so we're

play01:55

going to put a 1

play01:58

for that square

play02:00

now for the next one a b is still 0 1

play02:03

and c is 1.

play02:05

so here's where a b is 0 1 and c is 1

play02:08

giving us this square which the function

play02:11

value is 0.

play02:17

next a b is 1 0 so we're dealing with

play02:20

the last column and c is zero so the

play02:23

function value

play02:25

is one

play02:27

now for this one a b is

play02:29

one zero still

play02:31

c is one

play02:33

and the function value is one

play02:37

next we have a b is one one

play02:40

so that's the third column

play02:42

c is zero and the function value is one

play02:46

and for the last one

play02:48

the function value is zero

play02:50

where a b and c is one

play02:53

so that's how we can take the data in a

play02:55

truth table

play02:57

and put it on a karnaugh map or

play03:00

for short we could say k map

play03:04

now

play03:05

how can we take this data and turn it

play03:07

into a function

play03:09

what we need to do is basically circle

play03:13

groups of ones together

play03:15

we can circle

play03:17

one one or we could circle two ones

play03:21

but we cannot circle three once

play03:24

the number of ones that you can circle

play03:26

could be one

play03:27

two four eight

play03:30

and so forth it has to be a power of two

play03:33

so you can't circle three ones

play03:35

five ones six ones not gonna work

play03:40

so the best thing we can do is circle

play03:42

two groups or two pairs of ones

play03:45

let me use a different color so you can

play03:46

see it

play03:48

so let's start with this one

play03:50

now what type of

play03:53

what information can we derive from that

play03:55

group of ones

play03:57

those two ones highlighted do they

play04:00

depend on the input a

play04:03

notice that the input a varies between 0

play04:06

and 1 yet the output is the same

play04:09

so the output for those two

play04:12

ones does it depend on a

play04:16

notice that it depends on b

play04:18

when b is one

play04:20

the output is one so we're looking for

play04:22

the variable

play04:23

that doesn't change

play04:25

b doesn't change

play04:28

so should we write b

play04:29

or not b

play04:31

because b is one and the output is one

play04:33

we're gonna write b

play04:35

now

play04:36

these two or this pair of ones also

play04:39

corresponds to a c value of zero

play04:41

notice that c is always zero

play04:44

for

play04:45

that pair of ones

play04:47

so because z c is zero

play04:49

and the output is one we need to write

play04:51

not c

play04:53

now let's move on to the next pair of

play04:56

ones

play04:57

so let's put an or symbol represented by

play04:59

the plus sign

play05:02

so

play05:03

for the second pair of ones

play05:05

what variables

play05:07

do not change

play05:10

so notice that c

play05:11

changes

play05:13

so for this pair of ones it is

play05:15

independent of c

play05:17

but notice that a b

play05:19

is the same a is one b is

play05:22

zero so which one is going to be not a

play05:26

is it air b

play05:27

so because a is one and it matches the

play05:29

output function one

play05:32

we're going to leave it as a but because

play05:34

b is zero

play05:36

we need to put

play05:37

not b

play05:39

because

play05:40

not zero is one

play05:44

so this

play05:46

is the function

play05:48

that explains this truth table

play05:50

now we could test it out

play05:52

so let's see if

play05:54

a is zero and if b is one and if c is

play05:57

one

play05:58

if we get a function value of zero

play06:01

so b is one

play06:04

c is one a is zero

play06:07

and b is one

play06:11

so if we put

play06:13

if we write the complement of one that's

play06:15

going to be zero

play06:18

so we have zero times one which is zero

play06:21

and zero times zero is zero so we get an

play06:23

output of zero

play06:25

so that worked

play06:27

let's try another one

play06:34

let's try this one

play06:36

let's see if the function will give us

play06:38

the correct output

play06:41

so b is zero

play06:43

c is one

play06:45

a is one

play06:47

and b is zero

play06:50

now the complement of one is zero

play06:54

and the complement of zero is one

play06:56

zero times zero is zero one times one is

play06:58

one

play06:59

zero plus one is one

play07:01

so we get the right output

play07:04

now for the sake of practice

play07:07

let's make sure that we have the right

play07:08

function let's try the last one

play07:12

so b is one c is one

play07:16

a is one

play07:18

and b is one as well so the complement

play07:21

of one is zero

play07:23

and one times zero is zero zero plus

play07:26

zero is zero and we can see that we have

play07:28

the correct output

play07:32

so we have the correct function

play07:34

so that's how you could use a karnaugh

play07:36

map

play07:37

to quickly

play07:39

write a function that corresponds to a

play07:42

truth table

play07:43

now let's take the function that we have

play07:46

and turn it into a circuit diagram

play07:50

so the function that we have was b

play07:53

times the complement of c

play07:55

plus a

play07:57

times the complement of b

play07:58

so we can write that as

play08:00

b c prime plus

play08:03

a

play08:04

b prime

play08:08

so we need an and gate to connect b and

play08:10

c prime

play08:12

so let's start with that

play08:19

and we need another and gate

play08:21

to connect

play08:23

a

play08:24

and b prime

play08:27

so this is going to be b

play08:29

and c prime and here we have a

play08:32

and b prime

play08:34

now notice that we have

play08:36

a plus symbol between

play08:38

these two terms

play08:40

so we need to use an or gate

play08:43

the plus symbol is associated

play08:45

with the or operation

play08:53

so the output of this and gate

play08:55

is going to be b c prime

play08:58

and the output of this and gate is going

play09:00

to be

play09:01

a b prime

play09:03

and the output of the or gate

play09:06

is going to give us the function f

play09:09

which is what we have here

play09:12

so that's the circuit diagram that

play09:13

corresponds to this function

play09:17

let's try another example

play09:19

let's use this truth table

play09:21

to create a k-map

play09:23

and then use that to write a function

play09:25

which will then use that to turn it into

play09:27

a circuit diagram

play09:30

if you want to pause the video and try

play09:31

this problem feel free

play09:33

now

play09:34

the type of k-met that i'm going to draw

play09:36

is going to be a little bit different

play09:37

than the last one

play09:39

the last one was a three variable k-map

play09:42

drawn in the horizontal direction

play09:44

but i'm going to draw one with

play09:47

a vertical

play09:49

orientation

play09:53

so instead of having two rows four

play09:55

columns

play09:57

i'm going to have two columns

play09:59

and four rows

play10:04

so i'm going to put one variable above

play10:06

the diagonal line

play10:08

two variables below it

play10:10

so a has two possibilities zero or one

play10:14

bc can be zero zero

play10:16

zero one one one

play10:19

or one zero

play10:21

so that's how you can draw a three

play10:22

variable k map

play10:24

with

play10:25

vertical orientation

play10:28

now let's fill in a table

play10:30

so for this first column a is zero which

play10:33

we can see it for the first four inputs

play10:37

so here when b is when b and c is zero

play10:40

the function is going to be zero

play10:44

and when bc is 0 1

play10:46

the function is going to be 1.

play10:49

when bc is 1 0

play10:52

the function is 0

play10:54

and when bc is 1

play10:56

the function is 1.

play10:58

now for the second column

play11:00

a is always one which will correspond to

play11:02

these four

play11:04

so when bc is zero

play11:06

the function is one

play11:08

and when bc is zero one the function is

play11:12

also one

play11:13

when bc is one zero the function is one

play11:16

and when bc is one one the function is

play11:18

zero

play11:20

so that's how we can quickly fill out

play11:22

this k-map

play11:24

now how can we use it to write a

play11:26

function for the truth table

play11:30

so let's start with

play11:32

this pair of ones

play11:35

notice that a is always zero

play11:39

so we need to write the complement of a

play11:41

because the complement of zero will give

play11:43

us an output of one

play11:45

now for those pair of ones

play11:47

notice that

play11:48

b

play11:49

changes

play11:51

so

play11:52

the output is independent of b so we're

play11:55

not going to include b but notice that c

play11:57

is one

play11:58

so we're just going to write c

play12:01

now let's draw the next pair of ones

play12:05

so notice that a is always one for that

play12:08

group

play12:10

and this time c changes so it's

play12:12

independent of c

play12:14

but b is consistent b is always zero

play12:17

so we're going to write b prime

play12:20

now there's only one

play12:22

last one that we need to consider

play12:24

and that's here

play12:27

so a is one we're just gonna write a

play12:31

b is one we're gonna write b

play12:33

and because c is zero we're gonna write

play12:36

c prime

play12:37

so this is the function

play12:39

that corresponds to this truth table

play12:43

now let's test the function to make sure

play12:44

that we do indeed have the right one

play12:47

so let's start with what we have here

play12:52

so a is zero

play12:54

c

play12:55

is a zero

play12:59

a is still zero b prime b is one

play13:02

and then we have a b c prime so a is

play13:06

zero

play13:07

b is one

play13:08

c is zero

play13:11

the complement of zero is one

play13:14

the complement of one is zero

play13:17

and the complement of zero is one one

play13:20

times zero is zero zero times zero is

play13:23

zero

play13:24

and zero times one is also zero

play13:27

so this adds up to zero

play13:28

which we can see that's the case

play13:35

now let's try one more

play13:41

let's try

play13:42

this one

play13:44

where a b and c is a one so we have

play13:47

the complement of one times one

play13:50

plus one times the complement of one

play13:52

plus one times one times the complement

play13:54

of one

play13:56

the complement of one is a zero

play14:04

so automatically zero times one is zero

play14:07

one times zero is still zero

play14:09

and the last one is going to be zero so

play14:11

the output is once again zero

play14:15

okay let's try one that's gonna give us

play14:18

a value of one let's try this one

play14:22

so a is one

play14:25

c

play14:26

is one

play14:28

b is zero

play14:31

and a is one

play14:32

b is zero

play14:34

c is one

play14:36

so the complement of one is zero

play14:39

the complement of zero

play14:40

is one

play14:42

and the complement of one is zero

play14:45

zero times one is zero one times one is

play14:47

one

play14:48

one times zero times zero is zero

play14:51

zero plus one plus zero is one

play14:54

so this function works

play14:58

so now you know how to write a function

play15:00

using

play15:01

the k-map

play15:05

but now let's turn this function

play15:08

into a circuit diagram

play15:15

let's draw the logic circuit that

play15:16

corresponds this function

play15:19

so let's start with the first term that

play15:21

we have

play15:23

so we need an and gate

play15:28

so it's going to be a prime c

play15:30

and the output will be

play15:32

a prime c

play15:35

now for the second

play15:37

and gate the input will be a

play15:41

and the second input is going to be b

play15:42

prime

play15:44

giving us the output a

play15:46

b prime

play15:48

now for the last one i'm going to use a

play15:49

three input and gate

play15:53

so the three inputs will be a

play15:55

b and c prime

play16:00

now we need a three input

play16:02

or gate

play16:11

so then this will give us the output

play16:12

function f

play16:15

and so that's how you can draw

play16:18

the logic circuit

play16:19

for this particular function

play16:23

consider the four variable k map that we

play16:26

have

play16:27

on the screen

play16:29

go ahead and

play16:31

write a function for this k-map

play16:35

feel free to pause the video

play16:38

so first let's begin by analyzing those

play16:41

two pair of ones

play16:43

so notice that a and b

play16:46

is always one

play16:48

for that selection

play16:51

so we have a and b

play16:54

and for that selection

play16:56

notice that c

play16:58

is always zero

play17:00

but d

play17:01

changes

play17:03

so it depends on

play17:04

c but not d

play17:06

so we have a b

play17:08

and since c is zero we're gonna have c

play17:10

prime

play17:13

now let's select another pair of ones

play17:16

so let's go with that

play17:19

now notice that a is always zero

play17:23

so we're gonna have a prime

play17:25

b changes so it's gonna be independent

play17:27

of b

play17:28

now c

play17:30

is always one and d is always zero so

play17:33

we're going to write d prime

play17:37

now let's select this pair of ones that

play17:40

we have there

play17:43

so a is always one

play17:45

and b is always zero so let's write b

play17:48

prime for

play17:49

for that part

play17:52

now

play17:53

notice that c

play17:55

changes with the numbers zero and one

play17:57

but d remains the same d is always one

play18:00

so this is going to be a b prime d

play18:04

so this is the function that corresponds

play18:07

to this particular four variable k map

play18:11

let's try another example

play18:12

go ahead and try this one

play18:18

so instead of selecting two ones we can

play18:20

select a group of four ones

play18:23

so for that particular group

play18:25

which variables remain the same

play18:28

notice that a is always 0 and b

play18:32

is always 0. so we're going to have a

play18:34

prime and b prime

play18:36

now c

play18:38

can be 0 or 1 so it's independent of c

play18:41

and d can also be zero or one

play18:44

so it's only going to depend on a and b

play18:47

for that first selection

play18:49

now the next selection

play18:51

we can basically take a square of ones

play18:55

so which variables are constant

play18:58

notice that a is always one

play19:01

so we're going to write a

play19:03

b

play19:04

changes between one and zero so it's

play19:06

independent of b

play19:08

on this side

play19:09

notice that d

play19:11

is always one

play19:12

so it's going to depend on d

play19:16

c

play19:16

changes so it's independent of c

play19:19

so this particular function

play19:22

is represented by this equation it's a

play19:24

prime b prime plus a d

play19:27

so now you know how to take the

play19:28

information from a four variable k map

play19:31

and turn it into a function

play19:34

now let's say that we're given a

play19:36

function

play19:37

ac

play19:38

plus

play19:40

a b prime

play19:42

so how can we take this function

play19:44

and create a three variable k map

play19:47

and let's create it in the horizontal

play19:49

direction

play19:57

so we're gonna need two rows

play20:01

and four columns

play20:04

so we're gonna put a b above the

play20:05

diagonal line and c below it

play20:08

so a b can be 0 0

play20:10

0 1

play20:12

1 1 or 1 0

play20:14

and c could be 0 or 1.

play20:17

now let's focus on the ac term

play20:21

notice that we don't have any

play20:23

compliments here

play20:25

so we're looking for when a is one

play20:27

and when c is one

play20:30

c

play20:31

is one anywhere in this row

play20:34

a

play20:35

is one here

play20:37

so what we're going to do is we're going

play20:38

to put a 1

play20:40

in those boxes

play20:42

now let's focus on the next term

play20:44

a b prime

play20:47

so we just have a we're going to put one

play20:50

we have the complement of b so we're

play20:51

going to write zero

play20:54

so let's identify

play20:56

where a is one and b is zero

play21:00

so this is when a is one and b is zero

play21:03

so anywhere in this region

play21:07

so we need to fill this row with a one

play21:10

and we have an overlapping one there

play21:13

now every other box

play21:15

we're going to put a 0 in it

play21:18

so that's how we can take a function

play21:21

and draw a k map from it

play21:24

now let's try another example

play21:27

so let's say the function

play21:29

is a

play21:30

b prime

play21:32

plus ac

play21:34

plus a prime

play21:36

bc prime

play21:38

so let's create another three variable k

play21:40

map

play21:41

but in the vertical orientation

play21:50

so we're going to have two columns

play21:53

and four rows

play21:57

so we're going to put the letter a on

play21:58

top

play21:59

bc below the diagonal line

play22:02

so a can be 0 or 1

play22:04

bc can be 0 0 0 1

play22:07

1 1 or 1 0.

play22:11

now let's start with this term a b prime

play22:16

so a is going to be 1 b is going to be

play22:18

0.

play22:19

a is 1 in this column

play22:22

so let me just highlight that in red

play22:25

and b is 0

play22:29

here

play22:31

so that means we're going to put a 1

play22:34

in those first two boxes on the right

play22:37

now let's move on to the next term ac

play22:40

so that's when a is one

play22:42

and when c

play22:44

is one

play22:46

so we need to put a one here

play22:48

and here

play22:50

now for the next one we have a prime b c

play22:53

prime

play22:56

i forgot to put 1 1 for that

play22:59

now for a prime we're going to write 0

play23:01

for b we're going to put 1

play23:03

for c prime we're going to write 0.

play23:08

so a is 0

play23:10

in the first column

play23:12

and

play23:13

b

play23:14

is 1

play23:18

here

play23:18

and c is 0 here

play23:22

so we want a

play23:23

to be 0 and b to be 1 and c to be 0.

play23:27

so that only corresponds to this last

play23:29

square

play23:31

so we're going to put

play23:33

a 1 there

play23:35

so every other box we're going to put a

play23:37

0

play23:38

and so that is the k-map

play23:40

that corresponds

play23:41

to that function

play23:44

here's another harder example

play23:46

let's say the function is a b prime

play23:49

plus a prime c d

play23:52

plus a

play23:53

b c prime

play23:55

go ahead and draw a k map for that

play23:57

function

play23:58

now what type of k map do we need would

play24:01

you say it's a three variable k map or a

play24:03

four-variable k-map

play24:05

notice that we have four variables a b c

play24:08

and d

play24:12

so this time

play24:13

we're going to need

play24:18

four columns

play24:20

and four rows

play24:32

let's put the letters a b

play24:34

on top

play24:35

and c d on the bottom

play24:37

so a b could be 0 0

play24:40

0 1

play24:41

1 1 and 1 0

play24:43

and the same is true for cd

play24:48

now

play24:49

let's focus on

play24:50

a b prime

play24:53

so we have a

play24:55

which we're going to put a 1 for that

play24:57

and for the complement of b let's put a

play24:59

zero

play25:00

so one is a one and one is b zero

play25:05

a is one

play25:06

and b is zero

play25:08

anywhere in this column

play25:10

so we're gonna put a one

play25:12

everywhere in that column

play25:14

now let's move on to the next term

play25:16

a prime c d

play25:19

so let's put the zero for the complement

play25:21

of a and a one for c and d

play25:24

so notice that c and d is one in this

play25:26

region and a

play25:29

is zero

play25:31

in the first two columns

play25:33

so therefore we have to put a one

play25:35

at the intersecting squares

play25:38

now for the last term

play25:40

a b c prime

play25:42

we're going to put a 1 for a and b and a

play25:45

0 for the complement of c

play25:48

so

play25:49

a and b are 1 in this region

play25:52

c

play25:53

is 0

play25:55

in the first two

play25:56

rows

play25:58

so we're going to put a 1 here

play26:02

everywhere else we're going to fill it

play26:03

in with a zero

play26:04

and so now we've completed the four

play26:07

variable k map

play26:09

let's work on one more example

play26:11

so this one i'm going to color code

play26:13

differently

play26:14

so let's say the function is c

play26:17

a d prime

play26:18

plus

play26:20

a prime b c prime d

play26:23

plus a

play26:24

b prime c

play26:26

so go ahead and fill out the four

play26:28

variable k map

play26:29

given this function

play26:31

so let's start with the lettuce c

play26:34

so since we have c and not the

play26:35

complement of c it's just going to be

play26:37

one

play26:39

c

play26:40

is one in this region

play26:42

so that's anywhere in the last two rows

play26:49

so we're gonna have to put a one in

play26:52

all of those rows i mean in the in those

play26:55

two rows

play26:58

so i'm gonna

play26:59

color code this

play27:01

group of eight ones

play27:03

notice that when we have

play27:05

just a term with one variable

play27:07

we're going to get eight ones

play27:09

for a term with two variables we're

play27:12

going to get four ones

play27:14

for a term with three variables

play27:16

we're going to get two ones

play27:18

and four a term with four variables

play27:20

we're only going to get

play27:22

one one

play27:24

so let's move on to the next one

play27:26

a d prime

play27:30

so for a i'm gonna put one

play27:33

and for d prime is zero

play27:36

so a is one

play27:39

in

play27:40

the last two columns on the right

play27:42

and d is zero

play27:44

here

play27:48

so we're going to have

play27:51

a 1

play27:52

and these as well

play27:54

so now i'm going to circle those ones

play27:57

with a red color

play28:05

so as we can see

play28:07

for a term with two variables

play28:09

we have a total

play28:11

of four ones highlighted in red

play28:14

now let's move on to the next term

play28:17

which has four variables

play28:19

so we should only get

play28:22

one one

play28:23

in the k map

play28:25

so for a prime we're gonna write zero

play28:27

for b one c prime 0 d1

play28:32

so

play28:33

when a is 0 and b is 1 here

play28:38

c

play28:39

is 0 and d is 1 here

play28:43

we're just going to put a 1 in this

play28:45

region

play28:48

and i'm going to highlight it

play28:50

in green

play28:53

now for the last one

play28:56

a b prime c

play28:58

so we're going to have a 1 for a

play29:00

0 for b prime and a 1 for c

play29:04

so first let's identify where

play29:06

a b is 1 0

play29:08

so that's going to be

play29:10

in this region

play29:12

and now let's identify where c

play29:14

is one

play29:15

c is one

play29:17

in the second and the third row from the

play29:19

top

play29:21

so we're gonna need a one here and the

play29:23

one that we already have here

play29:26

so as you can see for a term with three

play29:28

variables

play29:29

we get a pair of ones or two ones

play29:34

everything else

play29:35

let's put a zero

play29:37

and so now you know how to turn a

play29:38

function into a k-map

play29:41

so that's it for this video thanks for

play29:42

watching

Rate This
β˜…
β˜…
β˜…
β˜…
β˜…

5.0 / 5 (0 votes)

Related Tags
Karnaugh MapsTruth TablesDigital LogicCircuit DesignLogic FunctionsAND GatesOR GatesComplementVariablesCodingEducational