Arrays and Logic Gates PDF Presentation

Summary

This presentation explains arrays and logic gates. It includes definitions, truth tables, and examples of various logic gates like AND, OR, and NOT. The document also demonstrates how to add and subtract in an array.

Full Transcript

ARRAYS AND LOGIC GATES by: dohan ye 2. definition of TRUTH TABLES A truth table is a tool used to visualise terms...

ARRAYS AND LOGIC GATES by: dohan ye 2. definition of TRUTH TABLES A truth table is a tool used to visualise terms the results of Boolean expressions 1. ARRAYS An array is a data structure that 3. holds similar, related data LOGIC GATES A logic gate is a device performing a 4. Boolean logic operation on one or ELEMENTS 5. more binary inputs and then outputs a single binary output An Element in an array is the data INDEX that one stores inside an array. All A numerical value that represents Elements in one array often have the position of an Element in an the same data type. array. logic gates Logic gates are devices that perform a Boolean operation, there are seven types of logic gates. logic gates - AND AND is a logic gate which only produces a positive output when both inputs are positive. i.e - 0 * 1 = 0 BUT 1*1=1 The formula for this Logic Gate is: X=AXB logic gates - OR OR is a True or False Logic gate, in which 0 represents False and 1 represents True. It will only produce a True output if at least one of the inputs is True/1 i.e 1 + 0 = 1 0+0=0 The formula for this logic gate is X = A + B logic gates - NOT NOT or an Inverter logic gate, is a logic gate that outputs the opposite of the input. i.e 1 = 0 0=1 The formula for this logic gate is X = Ā arrays An array is a set of values of the same data type stored NOTE: All Arrays must have a file name, this is used to under one identifier. Below are two examples of arrays. identify the array and what exact kind of data it holds. i.e: DOB, Transport, Music Genre This is an array containing different types of transportation methods, if one wanted to access the Car value, they would use Transport, or if they wanted to access the Bicycle, they would use Transport This is an array consisting of the seating positions of a few people in Year 9. how to add/subtract in here is a number array. an array When adding or subtracting numbers in an array, the numbers are referred to by their index. i.e Index 3 (35) + Index 5 (49) = 84 THANK YOU!

Use Quizgecko on...
Browser
Browser