Ideas.  Interesting.  Public catering.  Production.  Management.  Agriculture

Topic: logical foundations of information processing presentation. Presentation on "logical foundations of computers". Each compound statement can be expressed as a formula


The logical elements of a computer operate with signals - electrical impulses. There is a pulse - the logical meaning of the signal is 1. There is no pulse - 0. Signals-values ​​of the arguments are received at the inputs of the logical element, and the signal-value of the function appears at the output.









Let's make a table for adding single-digit binary numbers, taking into account the transfer to the most significant digit.. From the table it can be seen that P = A & B S = (AvB) & (A & B)


Let's build an addition circuit: To ensure the transfer, you need to use a logical element “AND”, which has two inputs; at the output we get a logical multiplication element. This circuit is called a half-adder, because implements the summation of single-digit binary numbers without taking into account the carry from the least significant digit. A B AND AND NOT OR A&BA&B A&BA&B


Full one-bit adder. A full one-bit adder must have three inputs: A, B, and P 0 two outputs: S and P. Addends Transfer from the least significant digit Transfer Sum ABP0P0 PS

Presentation on the topic "Logical foundations of a computer" in computer science in powerpoint format. This presentation for schoolchildren in grades 10-11 examines the logical foundations on which the operation of a modern computer is built. Author of the presentation: Sergeev Evgeniy Viktorovich.

Fragments from the presentation

Basic Logic Gates

The computer performs arithmetic and logical operations using the so-called. basic logic elements, which are also called gates.

  • The “I” gate is a conjunctor. Implements conjunction.
  • The OR gate is a disjunctor. Implements disjunction.
  • The “NOT” valve is an inverter. Implements inversion

Components

  • Any logical operation can be represented through conjunction, disjunction and inversion
  • Any computer element, no matter how complex, can be constructed from elementary gates

Argument signals and function signals

Valves operate with electrical impulses:

  • There is an impulse - the logical meaning of the signal is “1”
  • There is no impulse - the logical meaning of the signal is “0”

Pulses are supplied to the inputs of the gate - the values ​​of the arguments; a signal appears at the output of the gate - the value of the function

Logic circuit type "AND" (conjunctor)

Electrical circuit of two switches connected in series

OR logic circuit (disjunctor)

Electrical circuit of two parallel connected switches

NOT type logic circuit (inverter)

Electrical circuit with one circuit breaker

Conjunctor

  • Signals 0 or 1 are supplied to the conjunctor inputs
  • At the output of the conjunctor, signals 0 or 1 appear in accordance with the truth table

Disjunctor

  • 0 or 1 signals are supplied to the disjunctor inputs
  • At the output of the disjunctor, signals 0 or 1 appear in accordance with the truth table

Inverter

  • 0 or 1 signals are supplied to the inverter inputs
  • 1 or 0 signals appear at the inverter output in accordance with the truth table

Binary number adder

  • Any mathematical expression, no matter how complex, can be represented as a sequence of elementary mathematical operations
  • All mathematical operations in a computer come down to adding binary numbers
  • The microprocessor is based on binary number adders

Trigger

  • The most important structural unit random access memory and processor registers
  • Consists of two logical elements “OR” and two logical elements “NOT”
Trigger operation
  • In the normal state, a “0” signal is applied to the inputs of the flip-flop S and R and the flip-flop stores “0”.
  • When a signal “1” is applied to the input S, the trigger takes the value “1” at the output Q
  • When a “1” signal is applied to input R, the trigger returns to its original state - stores “0”





Logic element OR Converts two signals applied to the input into one signal at the output according to the following principle: if a logical one is applied to any input of the logical element OR, then the output of the element will be a logical one. If a logical zero is applied to both inputs, then the output of the OR element will also be zero. XYZ


Logic element AND Converts two signals applied to the input into one signal at the output according to the following principle: if a logical zero is applied to any input of the logical element AND, then the output of the element will be logical zero. If a logical one is applied to both inputs, then the output of the AND element will also be one. XYZ


Binary Number Half Adder This is a device for adding two binary numbers. It should give the following signals at the output: = = = = 10 Let's denote the terms X and Y, the results P and S, we get the truth table: X(slug)Y(slug)P(carry)S(sum)




Binary number adder In order to simplify the computer's operation as much as possible, the entire variety of mathematical operations in the processor is reduced to the addition of binary numbers. The main part The processor is an adder that provides such addition. A full one-bit adder must have three inputs: X, Y - terms and P 0 - carry from the least significant digit and two outputs: sum S and carry P.


Addition table Addends Transfer from low order Transfer Sum XYP0P0 PS


The table shows that the carry P takes the value 1 only when at least two logical variables simultaneously take the value 1, i.e. the transfer is implemented by sequentially adding the results of pairwise logical multiplication of input variables (X, Y, P 0). The carry formula is: P = (X&Y) (X&P 0) (Y&P 0) The logical expression for obtaining the sum in the full adder is: S = (X Y P 0)& ¬P 0 (X&Y&P 0) The multi-bit adder of the processor consists of full single-bit adders. A single-digit adder is placed on each digit, and the output (transfer) of the low-order digit is connected to the output of the adder of the highest digit.


Trigger This is the most important structural unit of the computer's RAM and internal processor registers. A trigger allows you to remember, store and read information (each trigger can store 1 bit of information). A trigger can be built from two logical “or” elements and two logical “not” elements.


Trigger Circuit In the normal state, the flip-flop inputs are supplied with a “0” signal, and the flip-flop stores the “0” signal. To record “1”, a “1” signal is supplied to input S (setup). The diagram shows that the trigger goes into this state and will remain stably in it even after the signal at the S input disappears. The trigger has remembered “1”, i.e. “1” can be read from the trigger output. In order to reset information and prepare to receive new information, a “1” signal is applied to input R (reset), after which the trigger will return to its original “zero” state. OR NOT S(1)RQ

Physically, each logical element is an electronic circuit in which some signals encoding 0 or 1 are supplied to the input, and a signal corresponding to 0 or 1 is also removed from the output, depending on the type of logical element. Computers and other automatic devices widely use electrical circuits containing hundreds and thousands of switching elements: relays, switches, etc. The development of such schemes is very labor-intensive. It turned out that the apparatus of logical algebra can be successfully used here. Physically, each logical element is an electronic circuit in which some signals encoding 0 or 1 are supplied to the input, and a signal corresponding to 0 or 1 is also removed from the output, depending on the type of logical element. Computers and other automatic devices widely use electrical circuits containing hundreds and thousands of switching elements: relays, switches, etc. The development of such schemes is very labor-intensive. It turned out that the apparatus of logical algebra can be successfully used here. 61


Processing any information on a computer comes down to the processor performing various arithmetic and logical operations. For this purpose, the processor includes an arithmetic-logical unit. It consists of a number of devices built on the logical elements discussed above. The most important of these devices are the adder and registers. 62


An adder is an electronic logic circuit that performs the summation of binary numbers. When summing two units according to the rules of binary arithmetic, the result is 10 and the 1 is transferred to the most significant binary digit. A multi-bit adder is built as a logical circuit based on single-bit binary adders. 63





One-bit binary adder. When adding numbers A and B in each digit, you have to deal with three digits: the digit ai of the first addend; digit bi of the second term; transferring pi-1 from the least significant digit. As a result of addition, we obtain the sum digit Si, and the “transfer” digit from this digit to the next (highest) digit pi+1. 67




TRIGGER. Trigger (trigger latch, trigger) a computer memory device for storing one bit of information. The trigger can be in one of two stable states, which correspond to logical “1” and logical “0”. A trigger is capable of almost instantly transitioning (“throwing”) from one electrical state to another and vice versa. TRIGGER. Trigger (trigger latch, trigger) a computer memory device for storing one bit of information. The trigger can be in one of two stable states, which correspond to logical “1” and logical “0”. A trigger is capable of almost instantly transitioning (“throwing”) from one electrical state to another and vice versa. 70






Register - is an electronic unit designed to store multi-bit binary numeric code. This code can be the numeric code of the instruction executed by the processor, or the code of some number (given) that is used when executing this instruction. In a simplified way, you can imagine a register as a collection of cells, each of which can contain one of two values: 0 or 1, that is, one digit of a binary number. To store one byte of information in the register, 8 cells - triggers - are needed. The number of flip-flops in the register is called the computer bit depth, which can be equal to 8,16,32 and


Main types of registers: 75 Memory registers. The computer's RAM is designed as a set of memory registers that serve only to store information. One register forms one memory cell, which has its own address. If the register contains N flip-flops, then N bits of information can be stored. Modern memory chips contain millions of triggers.


The program counter is a register of the control device (CU) of the processor, stores the address of the execution in this moment commands by which it is located in RAM. After executing this command, the control unit increases the value of this register by one, i.e. calculates the address in RAM where the next instruction is located. The command register - the CU register, is used to calculate the address of the cell where the data required by the currently executing program is stored. The flag register is a CU register that stores information about the last command executed by the processor. 76


Task: How many triggers are needed to store information with a volume of: 92 1 byte _________________________ 1 byte _________________________ 1 KB _________________________ 1 KB _________________________ 1 MB _________________________ 1 MB _________________________ 64 MB ________________________ 64 MB ________________________ 77


Homework: Textbook Ugrinovich: § 3.7 (page). Textbook Ugrinovich: § 3.7 (page). Assignment Assignment TEST - ASSEMBLY (LOGIC)_(f-12) TEST - ASSEMBLY (LOGIC)_(f-12)TEST - ASSEMBLY (LOGIC)_(f-12)TEST - ASSEMBLY (LOGIC)_(f-12) Training_tasks 2010 Training_tasks 2010 Training_tasks 2010 Training_tasks 2010 Presentation Log_tasks

Logical foundations of computers, grade 10 K. Polyakov, Logic, statements Aristotle (BC) Logic (ancient Greek λογικος) is the science of how to reason correctly, draw conclusions, prove statements. Formal logic is abstracted from specific content and studies only the truth and falsity of statements. A logical statement is a declarative sentence about which one can unambiguously say whether it is true or false.


Logical foundations of computers, grade 10 K. Polyakov, Notation of statements A – It is raining now. B – The window is open. simple statements (elementary) Compound statements are constructed from simple ones using logical connectives (operations) “and”, “or”, “not”, “if ... then”, “then and only then”, etc. Any statement can be false ( 0) or true (1). ! A and B A or not B if A, then B A if and only if B It is raining now and the window is open. It is raining now or the window is closed. If it is raining now, then the window is open. It rains if and only if the window is open.


Logical foundations of computers, grade 10 K. Polyakov, Operation NOT (inversion) If the statement A is true, then “not A” is false, and vice versa. Ane A truth table of the operation NOT also, not A (Pascal), ! A (C) The truth table of a logical expression X is a table where all possible combinations of values ​​of the source data are written on the left side, and on the right side - the value of the expression X for each combination.


Logical foundations of computers, grade 10 K. Polyakov, Operation I The statement “A and B” is true if and only if A and B are true at the same time. 220 V A and B A B


Logical foundations of computers, grade 10 K. Polyakov, Operation AND (logical multiplication, conjunction) ABA and B 1 0 also: A·B, A B, A and B (Pascal), A && B (C) conjunction - from lat. conjunctio connection


Logical foundations of computers, grade 10 K. Polyakov, Operation OR (logical addition, disjunction) The statement “A or B” is true when A or B is true, or both together. 220 V A or B AB


Logical foundations of computers, grade 10 K. Polyakov, Operation OR (logical addition, disjunction) ABA or B 1 0 also: A+B, A B, A or B (Pascal), A || B (C) disjunction – from lat. disjunction


Logical foundations of computers, grade 10 K. Polyakov, Tasks 9 The table shows queries to the search server. Arrange the query numbers in ascending order of the number of pages that the search engine will find for each query. To denote the logical operation "OR" in the query, the symbol is used, and for the logical operation "AND" - &. 1) printers & scanners & sale 2) printers & sale 3) printers | sale 4) printers | scanners | sale


Logical foundations of computers, grade 10 K. Polyakov, “Exclusive OR” operation The statement “A B” is true when A or B is true, but not both at the same time (that is, A B). "Sink or swim". AB A B 0 0 also: A xor B (Pascal), A ^ B (C) addition modulo 2: A B = (A + B) mod 2 arithmetic addition, 1+1=2 remainder


Logical foundations of computers, grade 10 K. Polyakov, Properties of the “exclusive OR” operation A A = (A B) B = A 0 = A 1 = A 0 ? AB A B A


Logical foundations of computers, grade 10 K. Polyakov, Implication (“if ... then ...”) The statement “A B” is true if it is possible that B follows from A. A – “The employee works well.” B – “At the employee good salary" ABA B


Logical foundations of computers, grade 10 K. Polyakov, Equivalence (“if and only if, ...”) The statement “A B” is true if and only if A and B are equal. ABA B


Logical foundations of computers, grade 10 K. Polyakov, Formalization The device has three sensors and can work if two of them are working. Write down the “accident” situation in the form of a formula. A – “Sensor 1 is faulty.” B – “Sensor 2 is faulty.” C – “Sensor 3 is faulty.” Alarm: X – “Two sensors are faulty.” X – “Sensors 1 and 2 are faulty” or “Sensors 1 and 3 are faulty” or “Sensors 2 and 3 are faulty.” logical formula Formalization is the transition to writing in a formal language! !


Logical foundations of computers, grade 10 K. Polyakov, Calculation of logical expressions Calculation order: brackets NOT AND OR, exclusive OR implication equivalence AB + + BC AC


Logical foundations of computers, grade 10 K. Polyakov, Compilation of truth tables ABA·BA·BX Logical expressions can be: identically true (always 1, tautology) identically false (always 0, contradiction) computable (depending on the source data)


Logical foundations of computers, grade 10 K. Polyakov, End of the film POLYAKOV Konstantin Yuryevich Doctor of Technical Sciences, computer science teacher GBOU Secondary School 163, St. Petersburg

Loading...