Logic
# Introduction

If you're serious about learning logic, there are many applications beyond these entertaining puzzles. In fact, you need not look any further than the device you're working on. Ultimately, all of the programming on your device boils down to processing hardware that implements logic in physical form.

These are representations of 4 types of logic gates used in computer science, specifically machine learning. They take two inputs, process these inputs in particular logical ways, and produce an output.

The diagram below shows AND gates that take two inputs (from the left) that each produce one output (to the right).

AND gates will **output 1** if both inputs are 1, otherwise they will **output 0**. (You can read "1" as equivalent to "true" and "0" as equivalent to "false".)

What will the output be at the question mark?

XOR gates will output 0 if **the inputs are the same**, otherwise they will output 1. (XOR stands for "exclusive or"; essentially "return true if one and only one of the inputs is true.")

The three gates below are all XOR gates. **The value A is used as input for two different gates.** What is A?

Note: In gates like these only 1 or 0 are possible inputs and outputs. There is no third, or other, possible input/output. Though it may be the case that the diagram above is impossible.

What is the output?

Because computers just implement the logic they're programmed with, the hard part of making a computer AI (Artificial Intelligence) is knowing what strategies to program it to use so that it functions intelligently.

The last two questions of this quiz begin to explore how you might program a game on a smartphone or desktop computer so that it can always play optimally against any opponent at games like tic-tac-toe.

Assume that you are playing a Tic-tac-toe game with an opponent. You are playing as \(X\) while your opponent plays as \(O\).

The game is played as follows:

Find all the possible grid tiles where you can put an \(X\)-mark that will help you guarantee yourself a win under best play.

In later quizzes in this course, we'll discuss more games and strategies. In this course, although the puzzle start out simple, we will eventually play around within many different advanced branches of logic including

- Sets and Syllogisms
- Computer Logic Gates
- Formal Logic.

×

Problem Loading...

Note Loading...

Set Loading...