{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Lecture-04 - Lecture 4 Truth functions evaluating compound...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Lecture 4: Truth functions, evaluating compound statements 1. Functions, arithmetic functions, and truth functions 2. Definitions of truth functions 3. Evaluating compound expressions 4. Categorizing statements Functions A function is something that takes inputs and produces outputs. You can think of them as a sort of abstract machine - like a bread machine that will produce as ‘output’ bread, if it is given as ‘input’ flour, yeast, sugar, etc. Arithmetic Functions Familiar examples of functions are the arithmetic functions addition, subtraction, multiplication and division Addition takes 2 numbers as input, and produces 1 number as output If you input 4 and 3, it outputs 7 Addition takes 2 numbers as input, and produces 1 number as output If you input 4 and 3, it outputs 7 A function can be defined in terms of its entire input-output structure x y x+y 1 1 2 1 2 3 2 1 3 2 2 4 A function can be defined in terms of its entire input-output structure x y x+y 1 1 2 1 2 3 2 1 3 2 2 4 x y x y 1 1 2 1 2 3 2 1 3 2 2 4 Addition ‘+’ Rickification ‘ x y x+y 1 1 2 1 2 3 2 1 3 2 2 4 Addition ‘+’ x y x x y 1 1 1 1 2 2 2 1 2 2 2 4 Multiplication ‘x’ x y x-y 1 1 0 1 2 -1 2 1 1 2 2 0 Subtraction ‘-’ x y x ÷ y 1 1 1 1 2 .5 2 1 2 2 2 1 Division ‘+’
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Truth Functions Truth functions are functions that take truth values as inputs, and produce truth values as outputs.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}