"Coding - The Language Hidden Behind the Computer" - Reading Notes (4): Logic

10. Logic & Switches

     1) Bits are also very important in logic, true and false can also be represented as 1 and 0

     2) In Boolean algebra, operands are not numbers but classes, and a class is a group (set) of a thing. In Boolean algebra, the calculation of classes uses intersection and union calculation, 1 means the complete set, and 0 means the empty set .

     3) Boolean algebra maps to the representation in the circuit: AND: series; OR: parallel

     4) The principle of using switches in circuits can create a telegraph, which can evolve into a computer

 

11. Doors

      1) In logic, logic gates work in a very simple way - either let current pass or block it.

      2) Network: It used to refer to the collection of multiple switches, but now it refers to the connection between computers.

      3) Shannon: Realizing that Boolean expressions can be implemented in circuits

      4) Logic Gate: A switch is an input device, and the input is the information that controls how the circuit works. A relay is similar to a switch and can be connected in series and parallel to perform simple logical tasks in a circuit. This combination of relays is called a logic gate.

 Switches are manual, while relays are controlled by current rather than manual (which can also be controlled by relays).

     5) AND gate (AND): Just like connecting two switches in series, the series connection of two relays is called an AND gate.

     

 

    6) OR gate (OR): (2 relays in parallel) only one input terminal is 1, and the output terminal is 1; when all are 0, the output terminal is 0;

    

 

    7) NOR gate NOR: (opposite to OR); NAND gate NAND: (opposite to AND)

    8) An inverter (not a logic gate) that can convert a low level to a high level (ie 0 to 1)

    9) The buffer (similar to the symbol of the inverter without the circle) has the same input and output, and delays a signal. This is because the relay takes a little time (fractions of a second) to trigger.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325074687&siteId=291194637