0 index
1 Computer Science –
2 What is an algorithm?
3 Why is this important?
4 Analytic Engine
5 Analytic Engine Concepts
6 World War II
7 Grace Hopper
8 What is a computer?
9 Universal
10 Information
11 Manipulator
12 Analog
13 Analog Devices
14 Analog Information
15 Digital
16 Digital Devices
17 Digital Information
18 Computers – digital or analog?
19 Information computers understand
20 Binary storage
21 Computer and Base 2
22 Binary Example
23 Binary
24 Base-2
25 Simple Table
26 Converting Decimal to Binary
27 Other numbering systems
28 Octal
29 ASCII
30 Converting to Base 8
31 Hexadecimal – base 16
32 Other Numbers
33 Twos Compliment
34 Floating Point /1
35 Floating Point/2
36 Example
37 Examples:
38 Ones Complement
39 Adding Negative Numbers
40 Try another
41 PAUSE
42 Compare
43 Floating Point
44 Binary
45 Conversion table (floating pt.)
46 Examples:
47 Errors
48 Do the math
49 Convert back
50 Normalized form
51 Scientific notation
52 Floating point
53 Example
54 Boolean logic
55 Boolean Identities
56 Or gate
57 OR truth table
58 The OR gate
59 Not gate
60 NOT truth table
61 The NOT gate
62 And gate
63 AND truth table
64 The AND gate
65 Virtual Logic Gate
66 Let's practice
67 Tools

outline
created using slideshow.cgi by Andy Harris















CSCI N301 Fundamental CS Concepts: cs12MidTerm
1. Computer Science –
  • Where do we begin?
    - Let’s begin with some background information
    - Computer Science is not the study of computers
    - Computer Science is the study of algorithms



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
2. What is an algorithm?
  • It is a well-ordered collection of unambiguous and effectively computable operations that, when executed, produces a result and halts in a finite amount of time.
    An Invitation to Computer Science Schneider, et al, 1999



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
3. Why is this important?
  • If we can specify an algorithm, we can automate the solution
    - a computing agent can carry it out
    - is able to understand and perform instructions
    - humans, robots, computers



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
4. Analytic Engine
  • In the midst of constructing the difference engine, amongst financial and technical difficulties, Babbage started to design a much more flexible, general purpose machine – the Analytic Engine



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
5. Analytic Engine Concepts
  • Four main components of modern computers -
    input
    processing
    storage
    output



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
6. World War II
  • Electronic Numerical Integrator and Computer (ENIAC) was developed as a general-purpose electronic digital computer
  • Used to calculate missile trajectories
  • Completed in 1946, used 18,000 vacuum tubes, 500 miles of wire and weighed more than 35 tons



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
7. Grace Hopper
  • A US Navy Commodore, also a mathematician who worked on early computers
  • Wrote the first paper on compilers (programs that translate instructions into the 1s and 0s the computer understands)
  • Created the first programming language, COBOL, that could be used on more than one machine



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
8. What is a computer?
  • It is a Universal Information Manipulator



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
9. Universal
  • Is a computer universal?
  • How is it ‘universal’?



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
10. Information
  • What is information?
    - numbers, words and instructions are examples of information
    - information is referred to as data



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
11. Manipulator
  • How does the computer manipulate information?
  • First, let’s talk about ways of storing information



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
12. Analog
  • Webster’s New World dictionary defines analog as “a system of measurement in which a continuously varying values, as sound, temperature, etc. corresponds proportionally to another value, esp. a voltage”



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
13. Analog Devices
  • Mercury thermometer
  • Radio dial
  • Clock with a second hand
  • Slide rule



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
14. Analog Information
  • Is mechanical
  • Usually offers nearly infinite precision, but limited accuracy.



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
15. Digital
  • Webster defines digital as “…a recording technique in which sounds or images are converted into groups of electronic bits and stored on a magnetic medium…”



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
16. Digital Devices
  • Digital watches
  • Digital thermometers



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
17. Digital Information
  • Is information stored as a series of numbers
  • Digital instruments are not as precise as analog counterparts, but are much more accurate



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
18. Computers – digital or analog?
  • We think of computers as digital devices
  • The digital nature of computers gives them their characteristics – limited precision but extreme accuracy



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
19. Information computers understand
  • They understand numbers – more accurately 0’s and 1’s which is technically on or off in regards to fluctuations in electronic voltages



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
20. Binary storage
  • Any mechanical device that exhibits yes/no behavior is referred to as a switch
  • A computer is essentially a huge number of switches
  • Voltages is an analog property, but forcing the circuitry to accept it as one of two values makes the computer a digital system



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
21. Computer and Base 2
  • On and Off, 1 and 0, voltages
  • Base 2 works just like base 10, but instead of using powers of 10 it uses powers of 2



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
22. Binary Example
  • Decimal ValueBinary Value2^32^22^12^0
      8s4s2s1s
    110001
    2100010



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
23. Binary
  • A base-2 positional numbering system
  • The value of a digit depends not only on it absolute value but also on its specific position within a number
  • Example: Base 10
    3, 873 is (3*10^3) + (8*10^2) + (7*10^1) + (3*10^0) or
    3000 + 800 + 70 + 3



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
24. Base-2
  • Same concept applies to base 2
  • Consists of two digits 0 and 1, referred to as bits
  • Example: Base 2
    111001 is
    (1*2^5) + (1*2^4) + (1*2^3) + (0*2^2) + (0*2^1) + (1*2^0)
    and evaluated to 32 + 16 + 8 + 0 + 0 + 1 = 57



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
25. Simple Table
  • 2^82^72^62^52^42^32^22^12^0
    2561286432168421
             



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
26. Converting Decimal to Binary
  • Understanding how we get there by example
  • Convert 67 to binary
    - use the table as a tool for conversion



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
27. Other numbering systems
  • Octal – base 8
  • Hexadecimal – base 16



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
28. Octal
  • How this relates to computers
    - byte is a eight-bit binary number
  • It takes exactly one byte to specify one character is ASCII (American Standard Code for Information Interchange)



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
29. ASCII
  • What is it?
    - each character on a computer is assigned a unique binary code number
  • The computers use a code called ASCII, in which an eight-bit binary number represents each character – thus one byte (2^8 or 256)



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
30. Converting to Base 8
  • Break it into binary
  • base 10 32 16 8     4 2 1
    base 2  1 0 1     1 1 0
    base 8    5         6  



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
31. Hexadecimal – base 16
  • Uses for hexadecimal – colors
  • Values – 0 - F



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
32. Other Numbers
  • Twos Compliment
  • Floating Point



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
33. Twos Compliment
  • In decimal notation, a negative number is preceded by a ‘-‘ (minus sign)
  • This is not possible in binary, so we declare one bit to be a sign bit and the rest of the number to be the quantity
  • The complement of a number in a given base can be defined as the difference between each digit of the number and the maximum digit value for the base.
  • Example: Base 10
    number is 26 compliment is 73 which is 9-2 = 7 and 9-6 = 3 or the compliment of 73



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
34. Floating Point /1
  • If x is any real number, its normal form representation is,
    x = f * 10E
  • Example:
    125.32 = 0.12532 * 103
    -125.32 = -0.12532 * 103
    0.65 = 0.65 * 100



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
35. Floating Point/2
  • The number f of the representation is called the mantissa and the E is the exponent



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
36. Example
  • sign
    of
    mantissa
    sign
    of
    exponent
    d1d2d3d4d5d6d7d8
    digits
    of
    mantissa
    digits
    of
    exponent



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
37. Examples:
  • The number –49 would be represented as:
    1  110001
    -    49
  • What about the binary number 1000000 and the binary number 0000000?



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
38. Ones Complement
  • Possible solution to the problem
  • The names comes from the fact that it is obtained by subtracting each digit of the input number from 1
  • However, two’s complement is the better solution – this is when 1 is added to the ones-complement



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
39. Adding Negative Numbers
  • Let’s calculate: 4 + (-6) using twos complement:
     - 8   4  2  1 
     0  1  0  0 
     1  0  1  0 



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
40. Try another
  • Calculate 5 + (-2) in binary



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
41. PAUSE
  • Pause the tape to do the calculation. When done, come back to see how it is done.



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
42. Compare
  • Is 10 the same as 110?



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
43. Floating Point
  • Also known as scientific notation
  • The number 1,023,48710 is 1.023487 * 106
  • The number 0.102348710 is 1.023487 * 10-1



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
44. Binary
  • The number 101001001112 is 1.0100100111 * 210
  • The number .00112 is .11 * 2-2



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
45. Conversion table (floating pt.)
  •  1/2  1/4  1/8  1/16  1/32 
     .5 .25.125.0625.03125
              



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
46. Examples:
  • Convert .625 into binary
    .625 * 2 = 1.250 (extract the 1)
    .250 * 2 = 0.500 (extract the 0)
    .500 * 2 = 1.000 (extract the 1)
  • The digits extracted are taken in the order extracted. In this case, the result is .101 (1/2 + 1/8 = 5/8 = .625)



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
47. Errors
  • One source of errors is converting back and forth between decimal and binary
  • Example:
    calculate .6 + .6
    first convert to binary .6
    .1001100110011……



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
48. Do the math
  • Find the sum
        .10011001
      +.10011001
      1.00110010



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
49. Convert back
  • So, 1.00110010 converts to 1 + 1/8 + 1/16 + 1/128 = 1.195 (actual sum = 1.2)
  • Error = 1.2 – 1.195 = .005 due to round off error made during conversions



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
50. Normalized form
  • In normalized form the leading 1 appears next to the decimal point.
  • Example:
    .11001001



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
51. Scientific notation
  • Avagadro’s number: Na = 6.022 * 10 23



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
52. Floating point
  • A BBBB C DD form (8 bits)
  • A = sign of the mantissa | BBBB = mantissa | C = sign of the exponent | DD = exponent
  • Example:
    +.1011 * 2+3
    0 | 1011 | 0 | 11



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
53. Example
  • sign
    of
    mantissa
    sign
    of
    exponent
    ABBBBCDD
    digits
    of
    mantissa
    digits
    of
    exponent



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
54. Boolean logic
  • Deals with manipulating the logical values true and false
  • True would be represented by the binary value 1
  • False would be represented by the binary value 0



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
55. Boolean Identities
  • Identity  Name  
    x + x = x
    x * x = x
    Idempotent laws
    x + 0 = x
    x * 1 = x
    Identity laws
    x + 1 = 1
    x * 0 = 0
    Dominance laws
    x + y = y + x
    xy = yx
    Commutative laws
    (x + y) + z = x + (y + z)
    x(yz) = (xy)z
    Associative laws
    x + yz = (x + y )(x + z)
    x(y + z) = xy + xz
    Distributive laws



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
56. Or gate
  • Several ways to write ‘or’
    - OR ex: a OR b
    - ‘+’ ex: a + b
    - ‘v’ ex: a v b
    - or gate



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
57. OR truth table
  • Lets build a truth table for A or B



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
58. The OR gate
  • The logical operation of an OR gate is:

    ABA OR B
    falsefalsefalse
    truefalsetrue
    falsetruetrue
    truetruetrue



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
59. Not gate
  • Ways to write ‘not’
    - NOT ex: NOT a
    - ‘¬’ ex: a ¬ b
    - not gate



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
60. NOT truth table
  • Let's build the NOT truth table



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
61. The NOT gate
  • The logical operation of a NOT gate is:
    A¬A
    falseTrue
    TrueFalse



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
62. And gate
  • Several ways to write ‘and’
    - AND ex: a AND b
    - ‘*’ ex: a * b
    - ‘^’ ex: a ^ b
    - ab
    - and gate



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
63. AND truth table
  • Let's build the AND truth table



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
64. The AND gate
  • The logical operation of an AND gate is:
    ABA ^ B
    falsefalsefalse
    falsetruefalse
    truefalsefalse
    truetruetrue



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
65. Virtual Logic Gate



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
66. Let's practice
  • Build the truth table for A OR ¬ B



































CSCI N301 Fundamental CS Concepts: cs12MidTerm
67. Tools



































outline

Computer Science –

  • Where do we begin?
    - Let’s begin with some background information
    - Computer Science is not the study of computers
    - Computer Science is the study of algorithms

What is an algorithm?

  • It is a well-ordered collection of unambiguous and effectively computable operations that, when executed, produces a result and halts in a finite amount of time.
    An Invitation to Computer Science Schneider, et al, 1999

Why is this important?

  • If we can specify an algorithm, we can automate the solution
    - a computing agent can carry it out
    - is able to understand and perform instructions
    - humans, robots, computers

Analytic Engine

  • In the midst of constructing the difference engine, amongst financial and technical difficulties, Babbage started to design a much more flexible, general purpose machine – the Analytic Engine

Analytic Engine Concepts

  • Four main components of modern computers -
    input
    processing
    storage
    output

World War II

  • Electronic Numerical Integrator and Computer (ENIAC) was developed as a general-purpose electronic digital computer
  • Used to calculate missile trajectories
  • Completed in 1946, used 18,000 vacuum tubes, 500 miles of wire and weighed more than 35 tons

Grace Hopper

  • A US Navy Commodore, also a mathematician who worked on early computers
  • Wrote the first paper on compilers (programs that translate instructions into the 1s and 0s the computer understands)
  • Created the first programming language, COBOL, that could be used on more than one machine

What is a computer?

  • It is a Universal Information Manipulator

Universal

  • Is a computer universal?
  • How is it ‘universal’?

Information

  • What is information?
    - numbers, words and instructions are examples of information
    - information is referred to as data

Manipulator

  • How does the computer manipulate information?
  • First, let’s talk about ways of storing information

Analog

  • Webster’s New World dictionary defines analog as “a system of measurement in which a continuously varying values, as sound, temperature, etc. corresponds proportionally to another value, esp. a voltage”

Analog Devices

  • Mercury thermometer
  • Radio dial
  • Clock with a second hand
  • Slide rule

Analog Information

  • Is mechanical
  • Usually offers nearly infinite precision, but limited accuracy.

Digital

  • Webster defines digital as “…a recording technique in which sounds or images are converted into groups of electronic bits and stored on a magnetic medium…”

Digital Devices

  • Digital watches
  • Digital thermometers

Digital Information

  • Is information stored as a series of numbers
  • Digital instruments are not as precise as analog counterparts, but are much more accurate

Computers – digital or analog?

  • We think of computers as digital devices
  • The digital nature of computers gives them their characteristics – limited precision but extreme accuracy

Information computers understand

  • They understand numbers – more accurately 0’s and 1’s which is technically on or off in regards to fluctuations in electronic voltages

Binary storage

  • Any mechanical device that exhibits yes/no behavior is referred to as a switch
  • A computer is essentially a huge number of switches
  • Voltages is an analog property, but forcing the circuitry to accept it as one of two values makes the computer a digital system

Computer and Base 2

  • On and Off, 1 and 0, voltages
  • Base 2 works just like base 10, but instead of using powers of 10 it uses powers of 2

Binary Example

  • Decimal ValueBinary Value2^32^22^12^0
      8s4s2s1s
    110001
    2100010

Binary

  • A base-2 positional numbering system
  • The value of a digit depends not only on it absolute value but also on its specific position within a number
  • Example: Base 10
    3, 873 is (3*10^3) + (8*10^2) + (7*10^1) + (3*10^0) or
    3000 + 800 + 70 + 3

Base-2

  • Same concept applies to base 2
  • Consists of two digits 0 and 1, referred to as bits
  • Example: Base 2
    111001 is
    (1*2^5) + (1*2^4) + (1*2^3) + (0*2^2) + (0*2^1) + (1*2^0)
    and evaluated to 32 + 16 + 8 + 0 + 0 + 1 = 57

Simple Table

  • 2^82^72^62^52^42^32^22^12^0
    2561286432168421
             

Converting Decimal to Binary

  • Understanding how we get there by example
  • Convert 67 to binary
    - use the table as a tool for conversion

Other numbering systems

  • Octal – base 8
  • Hexadecimal – base 16

Octal

  • How this relates to computers
    - byte is a eight-bit binary number
  • It takes exactly one byte to specify one character is ASCII (American Standard Code for Information Interchange)

ASCII

  • What is it?
    - each character on a computer is assigned a unique binary code number
  • The computers use a code called ASCII, in which an eight-bit binary number represents each character – thus one byte (2^8 or 256)

Converting to Base 8

  • Break it into binary
  • base 10 32 16 8     4 2 1
    base 2  1 0 1     1 1 0
    base 8    5         6  

Hexadecimal – base 16

  • Uses for hexadecimal – colors
  • Values – 0 - F

Other Numbers

  • Twos Compliment
  • Floating Point

Twos Compliment

  • In decimal notation, a negative number is preceded by a ‘-‘ (minus sign)
  • This is not possible in binary, so we declare one bit to be a sign bit and the rest of the number to be the quantity
  • The complement of a number in a given base can be defined as the difference between each digit of the number and the maximum digit value for the base.
  • Example: Base 10
    number is 26 compliment is 73 which is 9-2 = 7 and 9-6 = 3 or the compliment of 73

Floating Point /1

  • If x is any real number, its normal form representation is,
    x = f * 10E
  • Example:
    125.32 = 0.12532 * 103
    -125.32 = -0.12532 * 103
    0.65 = 0.65 * 100

Floating Point/2

  • The number f of the representation is called the mantissa and the E is the exponent

Example

  • sign
    of
    mantissa
    sign
    of
    exponent
    d1d2d3d4d5d6d7d8
    digits
    of
    mantissa
    digits
    of
    exponent

Examples:

  • The number –49 would be represented as:
    1  110001
    -    49
  • What about the binary number 1000000 and the binary number 0000000?

Ones Complement

  • Possible solution to the problem
  • The names comes from the fact that it is obtained by subtracting each digit of the input number from 1
  • However, two’s complement is the better solution – this is when 1 is added to the ones-complement

Adding Negative Numbers

  • Let’s calculate: 4 + (-6) using twos complement:
     - 8   4  2  1 
     0  1  0  0 
     1  0  1  0 

Try another

  • Calculate 5 + (-2) in binary

PAUSE

  • Pause the tape to do the calculation. When done, come back to see how it is done.

Compare

  • Is 10 the same as 110?

Floating Point

  • Also known as scientific notation
  • The number 1,023,48710 is 1.023487 * 106
  • The number 0.102348710 is 1.023487 * 10-1

Binary

  • The number 101001001112 is 1.0100100111 * 210
  • The number .00112 is .11 * 2-2

Conversion table (floating pt.)

  •  1/2  1/4  1/8  1/16  1/32 
     .5 .25.125.0625.03125
              

Examples:

  • Convert .625 into binary
    .625 * 2 = 1.250 (extract the 1)
    .250 * 2 = 0.500 (extract the 0)
    .500 * 2 = 1.000 (extract the 1)
  • The digits extracted are taken in the order extracted. In this case, the result is .101 (1/2 + 1/8 = 5/8 = .625)

Errors

  • One source of errors is converting back and forth between decimal and binary
  • Example:
    calculate .6 + .6
    first convert to binary .6
    .1001100110011……

Do the math

  • Find the sum
        .10011001
      +.10011001
      1.00110010

Convert back

  • So, 1.00110010 converts to 1 + 1/8 + 1/16 + 1/128 = 1.195 (actual sum = 1.2)
  • Error = 1.2 – 1.195 = .005 due to round off error made during conversions

Normalized form

  • In normalized form the leading 1 appears next to the decimal point.
  • Example:
    .11001001

Scientific notation

  • Avagadro’s number: Na = 6.022 * 10 23

Floating point

  • A BBBB C DD form (8 bits)
  • A = sign of the mantissa | BBBB = mantissa | C = sign of the exponent | DD = exponent
  • Example:
    +.1011 * 2+3
    0 | 1011 | 0 | 11

Example

  • sign
    of
    mantissa
    sign
    of
    exponent
    ABBBBCDD
    digits
    of
    mantissa
    digits
    of
    exponent

Boolean logic

  • Deals with manipulating the logical values true and false
  • True would be represented by the binary value 1
  • False would be represented by the binary value 0

Boolean Identities

  • Or gate

    • Several ways to write ‘or’
      - OR ex: a OR b
      - ‘+’ ex: a + b
      - ‘v’ ex: a v b
      - or gate

    OR truth table

    • Lets build a truth table for A or B

    The OR gate

    • The logical operation of an OR gate is:

    Identity  Name  
    x + x = x
    x * x = x
    Idempotent laws
    x + 0 = x
    x * 1 = x
    Identity laws
    x + 1 = 1
    x * 0 = 0
    Dominance laws
    x + y = y + x
    xy = yx
    Commutative laws
    (x + y) + z = x + (y + z)
    x(yz) = (xy)z
    Associative laws
    x + yz = (x + y )(x + z)
    x(y + z) = xy + xz
    Distributive laws
    ABA OR B
    falsefalsefalse
    truefalsetrue
    falsetruetrue
    truetruetrue

Not gate

  • Ways to write ‘not’
    - NOT ex: NOT a
    - ‘¬’ ex: a ¬ b
    - not gate

NOT truth table

  • Let's build the NOT truth table

The NOT gate

  • The logical operation of a NOT gate is:
    A¬A
    falseTrue
    TrueFalse

And gate

  • Several ways to write ‘and’
    - AND ex: a AND b
    - ‘*’ ex: a * b
    - ‘^’ ex: a ^ b
    - ab
    - and gate

AND truth table

  • Let's build the AND truth table

The AND gate

  • The logical operation of an AND gate is:
    ABA ^ B
    falsefalsefalse
    falsetruefalse
    truefalsefalse
    truetruetrue

Virtual Logic Gate

Let's practice

  • Build the truth table for A OR ¬ B

Tools