Coding Session 8 – Logic & Javascript

What is Binary?

1= True/Yes
0= False/No

What is Computational Logic?

A term that describes the decision-making process used in programming and writing algorithms.

  • Decomposition – Breaking down a complex problem or system into smaller, more manageable parts
  • Pattern Recognition – Looking for similarities among and within problems
  • Abstraction – Focusing on the important information only, ignoring irrelevant detail
  • Algorithms – Developing a step-by-step solution to the problem, or the rules to follow to solve the problem

To add all numbers from 1-200 the logic would be (200+1) / (200/2)

Logic Gates

logic-gates-min.png

AND Gate: Output (Y) is high only if both inputs are high (A and B)

Screenshot 2019-04-26 at 11.46.01

OR Gate: Output (Y) is high if A or B is high

Screenshot 2019-04-26 at 11.46.07

NOT Gate: Often called an inverter gate, the output (Y) is the reverse of the input (A). Only one input in this gate.

Screenshot 2019-04-26 at 11.52.30

NOR Gate: Combination of an Or and Not gate, Output from Or (A and B) is inverted to create output (Q)

Screenshot 2019-04-26 at 11.50.28

NAND Gate: Combination of AND and NOT gate, output from AND (A and B) is inverted to create output (Y).

Screenshot 2019-04-26 at 11.59.59.png

 

 

Leave a comment

Create a free website or blog at WordPress.com.

Up ↑

Design a site like this with WordPress.com
Get started