# Chapter 1. Computation theory

Save this PDF as:

Size: px
Start display at page:

## Transcription

1 Chapter 1. Computation theory In this chapter we will describe computation logic for the machines. This topic is a wide interdisciplinary field, so that the students can work in an interdisciplinary context. The field of computational logic include all kind of computational logic for machines or computers that is use of logic in computer science. Outline Introduction Turing Machine Binary System Boolean Algebra and Logic Gates Circuit Model of Computation Algorithm Models of computation P and NP Problems Motivations and ideas underlying quantum computation Introduction Let us briefly summarize developments of the computational logic. At 17th century Leibniz introduced an idea about the computational logic to determine the truth-value by using an algebraic logic and building a special language of alphabets George Boole proposed a (boolean) logic. This logic based on logical calculus of truth values. This algebra is the algebra of two values (0,1).... The search for algorithm to determine the truth-value of sentences was appeared mid 1920's. The algorithm answer the problem as Yes or No. This algorithm is known as decision algorithm. A complete decision algorithm gives answer of the problem in a finite time. An incomplete decision algorithm never finishes the computation if the answer is No, or may or may not finishes the computation if the answer is Yes. For significantly large problems the incomplete algorithm is important. In 1935 Alan Turing proposed a theoretical model of a device that can execute and possible algorithm. This device is known as Turing Machine. John von Neumann and his collaborators was designed first multipurpose programmable computer based on principles of the Turing Machine. Computation theory is very important because computers were first proposed and devised theoretically. Turing Machine Turing machine is a theoretical model of a device that can execute any possible algorithm. Turing machine has the following abilities: It can read and write on a tape It can move right or left on a tape

2 It halt (stop running) when it reach special accept state or special reject state, otherwise the machine never halt and continue loops. It has infinity memory! Example: Determine for the following statement Turing machine HALT or continue to LOOPS. for i=1 to infinity if 2*i is not some of two primes then HALT (STOP) It is obvious that this is an infinite LOOPS statement. Unfortunately, such an infinite LOOPS detector cannot exist. (There is no algorithm that detect an infinite loop). This problem is known as HALTING problem. Turing machine has the following components: {Q,,,, q 0, q accept, q reject, t} Q is finite set of state (s 0, s 1, s 2,...) is input alphabet ( ) is tape alphapet q 0 is the start state q accept is the accept state q reject is the reject state is transition function from one stateto another by a given condition. # is blank symbol(not in, #2 ) For each transition, the tape begins in a state s, then read a symbol a, then change to a state q(p q) and write a symbol b, moves left or right (L or R). If we are dealing Turing Machine as computers then our input alphabet will be ={0,1} (The input will be binary). a 0 a 1 a 2 a 3... a n # # # CONTROL Turing machine can be used as; function evaluator( Read w then write f(w)), language accepters (Reads w then write 1 if w is accepted otherwise write 0 or continue to read new value), problem deciders (read a decision problem coded in binary and it halts by writing 1 on tape if the answer YES otherwise if the answer NO it writes 0) etc. Example. Design a Turing Machine, erase input and write blank. Solution: ERASE Turing machine

3 Example: Design a Turing machine that will decide whether the binary input represent an EVEN number. Solution: EVEN Turing machine Basic principles: Move right to the first blank then move left one cell. If the current cell is 0, the number is even. If the current cell is 1, the number is odd. Erase the tape and write 0 or 1, accordingly. Binary System and Boolean Algebra Classical computers use binary digits. Information is represented electronically in a computer using voltages of different levels. For instance, a 0 could be represented by a 0 voltage and a 1 could be represented by a voltage of 3 volts. Human have 10 fingers which has led to adaptation of decimal (base 10) number system. Decimal number system consists of 10 digits (0-9). Binary number system (base 2) the digit takes values 0 or 1. Converting binary to decimal: Using power of 2 we can convert any binary number to the decimal number. For example: Converting decimal to binary Dividing given decimal number by 2 and writing the remainder in each division one can convert the number from decimal to binary. As an example convert the number 83 to the binary. Divided Divisior Remainder 83 83/ / / / / / Remove 1 last cell then the number can be written as:(from bottom to up):

4 Divided Divisior Remainder Then the number / / / / / / / Remove 1 last cell Conversion of Decimal Fractions to Binary There are various methods to convert a decimal fraction to the binary. One of them is based on multiplication of decimal fraction by 2. As an example consider conversion of 0.125: Number 2xNumber Integer Part Result Sometimes decimal fractions produce infinite binary fraction. Example: Convert decimal fraction 0.1 to binary: 2xNumber 0.1x2 0.2x2 0.4x2 0.8x2 0.6x2 0.2x2 0.4x2 0.8x2 0.6x2 Integer part Then 0.1= Conversion of Binary Fractions to the Decimal A binary fraction of a number can be converted to a decimal number using powers of (-2). For example Boolean Algebra

5 Logic circuits are basis of the classical computer system. To appreciate operation of the computer system you have to understand digital logic and Boolean algebra. Boolean Algebra is both a formalization of the algebraic aspects of logic. A Boolean variable can take two values 1(or T or ON) or 0 (F or OFF). Basic Boolean operations are AND, OR and NOT. We can make more complicated functions from the basic Boolean operations. AND operation is function of two variable (A, B). Boolean function representation F(A,B)=A.B. Table shows result of the AND operation. Truth Table AND Gate A B F OR operation is function of two variable (A,B). Boolean function representation F(A,B)=A+B Truth Table OR Gate A B F NOT operation replace a Boolean function with its compliment F(A)=A'. Complement 1=1'=0, Complement 0=0'=1. A' is read as NOT A ot Compliment A. Truth Table NOT Gate or inverter A F Basic theorems: Boolean operations have the following properties:

6 Algebra X+0=X X+1=1 X+X=X (X')'=X X+X'=1 Dual of the operation X*0=0 X*1=1 X*X=X (X')'=X X*X'=0 Dual of a Boolean expression can be obtained by replacing ANDs with ORs, ORs with ANDs, 1s with 0s, 0s with 1s. Theorems of the Boolean operations: Commutative X+Y=Y+X Associative (X+Y)+Z=X+(Y+Z) Distributive A(B+C)=AB+AC DeMorgan's Law (X+Y)'=X'Y' Dual Laws X*Y=Y*X (X*Y)*Z=X*(Y*Z) A+BC=(A+B)(A+C) (XY)'=X'+Y' Dual of Distributive law only valid for Boolean Algebra! Circuit Model of Computation As we mentioned before we can construct more complicated Boolean functions from the basic Boolean functions. The followings include some examples. Three input AND function Example: Factorize the Boolean expression A+B'CD, then implement the circuit. A+B'CD=(A+B')(A+CD) =(A+B')(A+C)(A+D) Its logic gate is:

7 We can construct the NAND and NOR gates from the combinations of the basic gates. A NAD gate can be thought as AND gate followed by and inverter and NOR gate can be thought as OR gate followed by an inverter. The last gate type is XOR gate. Its function is: Algorithm An algorithm is defined as a specific set of instructions for solving a problem. The word "algorithm" is a distortion of al-khwārizmī, a Persian mathematician who wrote an influential treatise about algebraic methods. The process of applying an algorithm to an input to obtain an output is called a computation. Some examples Everyday algorithm An algorithm is a step by step representation of a program. An algorithm can be presented for solving a mathematical problem by using a computer as well as to plan our daily life. In order to make an algorithm our plan include INPUT PROCESS ASSUMPTIONS (if any) OUTPUT Example: Calling a friend on phone

8 Pick up the phone Code friend s number (INPUT) Press Call buton (PROCESS) If busy hang up phone then call again after 5 min. (ASSUMPTION) If no answering, then hang up and aster 2 hour call again (ASSUMPTION) Talk to friend (OUTPUT) Example: Find the greatest common divisor (GCD) of two integers, m and n. Euclid's Algorithm: while m is greater than zero: If n is greater than m, swap m and n. Subtract n from m. n is the GCD Let us apply this algorithm for the numbers m=6 and n=21 m>0. n>m then m=21, n=6 21-6= =9 9-6=3 Then m=6; n=3 6-3=3 3-3=0 therefore n=3 is GCD HW. Write an algorithm to Determine prime numbers. How many prime numbers between 1 and For more algorithm visit: For factoring algorithms read the notes: We will compare factoring algorithms have been presented quantum computers and classical computers. Models of computation In this section we treat concept of computation and algorithm. Mechanical machines compute some output from some input. Everyday we use our computer to solve some typical problems. For example, given a list of numbers {8,12,98,1,52}, sort them in a order from smallest number to bigger... The output becomes {1,8,12,52,98}. Below some models of the computation are briefly summarized. At the beginning of this chapter we have discussed Turing Machine. Note that all computations that could ever be carried out on any other mathematical machine-models can also be carried out by Turing machines We also discussed Boolean (logical) circuits provide a model of computation that is not equivalent with the Turing machine. We have introduce some models of the computation which

9 a) Random Access Machines b) Straight Line Programs and Circuits (Boolean logical circuits) c) Turing Machines d) Decision Trees e) Machines That Make Random Choices P and NP Problems (Polynomial and Non-Deterministic Polynomial problems) When you run a program one of the important question is: How long does it take to execute the program. Suppose that you have a set of number. In order to sort the numbers you can write an algorithm. The executing time probably will be proportional to N 2 or Nlog(N) or similar expressions. If the executing time proportional to N, N 2 or any power of N then the problem is called Polynomial (P) problem. For a given problem if the executing time proportional to the Nth power of a number i.e e N, or x N then the problem is known as NP (Non-Deterministic Polynomial problems). Note that A Major application is in the cryptography area, Sipser says, where the security of cryptographic codes is often ensured by the complexity of a computational task. Example. Factorization of a number as product of the prime numbers is the problem between P and NP. Solution: You can write a simple division algorithm. Example. A traveling salesman has to travel a bunch of cities, in a such way that using the shrtest distance. This problem is between NP and NP hard. Solution: We have to calculate all alternative paths to find shortest distance. Table shows number of operations. The average time to determine shortest optimum path, with a computer operating per second can be calculated as: #path/ #cities Alternatives #path Timing 2 (12) 1(2-1)! 1 microsec 3 (123)(132) 2 (3-1)! 0.5 microsec 4 (1234) (1342) (1423) (1324) (1243) (1432) 6 (4-1)! 6 microsec (5-1)! 24 microsec (6-1)! 0.12 msec (10-1)! 0.36 sec (15-1)! 1 year Motivations and ideas underlying quantum computation Please read the articles given in the pages

10

### Theory of Computation Prof. Kamala Krithivasan Department of Computer Science and Engineering Indian Institute of Technology, Madras

Theory of Computation Prof. Kamala Krithivasan Department of Computer Science and Engineering Indian Institute of Technology, Madras Lecture No. # 31 Recursive Sets, Recursively Innumerable Sets, Encoding

### Classical Information and Bits

p. 1/24 Classical Information and Bits The simplest variable that can carry information is the bit, which can take only two values, 0 or 1. Any ensemble, description, or set of discrete values can be quantified

### Notes on Complexity Theory Last updated: August, 2011. Lecture 1

Notes on Complexity Theory Last updated: August, 2011 Jonathan Katz Lecture 1 1 Turing Machines I assume that most students have encountered Turing machines before. (Students who have not may want to look

### Primes. Name Period Number Theory

Primes Name Period A Prime Number is a whole number whose only factors are 1 and itself. To find all of the prime numbers between 1 and 100, complete the following exercise: 1. Cross out 1 by Shading in

### 1. True or False? A voltage level in the range 0 to 2 volts is interpreted as a binary 1.

File: chap04, Chapter 04 1. True or False? A voltage level in the range 0 to 2 volts is interpreted as a binary 1. 2. True or False? A gate is a device that accepts a single input signal and produces one

### Introduction to computer science

Introduction to computer science Michael A. Nielsen University of Queensland Goals: 1. Introduce the notion of the computational complexity of a problem, and define the major computational complexity classes.

### Introduction. Logic. Most Difficult Reading Topics. Basic Logic Gates Truth Tables Logical Functions. COMP370 Introduction to Computer Architecture

Introduction LOGIC GATES COMP370 Introduction to Computer Architecture Basic Logic Gates Truth Tables Logical Functions Truth Tables Logical Expression Graphical l Form Most Difficult Reading Topics Logic

### CS 3719 (Theory of Computation and Algorithms) Lecture 4

CS 3719 (Theory of Computation and Algorithms) Lecture 4 Antonina Kolokolova January 18, 2012 1 Undecidable languages 1.1 Church-Turing thesis Let s recap how it all started. In 1990, Hilbert stated a

### 3515ICT Theory of Computation Turing Machines

Griffith University 3515ICT Theory of Computation Turing Machines (Based loosely on slides by Harald Søndergaard of The University of Melbourne) 9-0 Overview Turing machines: a general model of computation

### Computing Functions with Turing Machines

CS 30 - Lecture 20 Combining Turing Machines and Turing s Thesis Fall 2008 Review Languages and Grammars Alphabets, strings, languages Regular Languages Deterministic Finite and Nondeterministic Automata

### Elementary Number Theory We begin with a bit of elementary number theory, which is concerned

CONSTRUCTION OF THE FINITE FIELDS Z p S. R. DOTY Elementary Number Theory We begin with a bit of elementary number theory, which is concerned solely with questions about the set of integers Z = {0, ±1,

### BOOLEAN ALGEBRA & LOGIC GATES

BOOLEAN ALGEBRA & LOGIC GATES Logic gates are electronic circuits that can be used to implement the most elementary logic expressions, also known as Boolean expressions. The logic gate is the most basic

### Gates, Circuits, and Boolean Algebra

Gates, Circuits, and Boolean Algebra Computers and Electricity A gate is a device that performs a basic operation on electrical signals Gates are combined into circuits to perform more complicated tasks

### Why? A central concept in Computer Science. Algorithms are ubiquitous.

Analysis of Algorithms: A Brief Introduction Why? A central concept in Computer Science. Algorithms are ubiquitous. Using the Internet (sending email, transferring files, use of search engines, online

### Turing Machines, Part I

Turing Machines, Part I Languages The \$64,000 Question What is a language? What is a class of languages? Computer Science Theory 2 1 Now our picture looks like Context Free Languages Deterministic Context

### Digital circuits make up all computers and computer systems. The operation of digital circuits is based on

Digital Logic Circuits Digital circuits make up all computers and computer systems. The operation of digital circuits is based on Boolean algebra, the mathematics of binary numbers. Boolean algebra is

### Quantum Computing. Robert Sizemore

Quantum Computing Robert Sizemore Outline Introduction: What is quantum computing? What use is quantum computing? Overview of Quantum Systems Dirac notation & wave functions Two level systems Classical

### The Classes P and NP

The Classes P and NP We now shift gears slightly and restrict our attention to the examination of two families of problems which are very important to computer scientists. These families constitute the

### CHAPTER 3 Boolean Algebra and Digital Logic

CHAPTER 3 Boolean Algebra and Digital Logic 3.1 Introduction 121 3.2 Boolean Algebra 122 3.2.1 Boolean Expressions 123 3.2.2 Boolean Identities 124 3.2.3 Simplification of Boolean Expressions 126 3.2.4

### Discrete Structures. Rajmohan Rajaraman Eric Ropiak Chris Burrows Ravi Sundaram

Discrete Structures Harriet Fell Javed A. Aslam Rajmohan Rajaraman Eric Ropiak Chris Burrows Ravi Sundaram Discrete Structures Version 2.1 Harriet Fell Javed A. Aslam Rajmohan Rajaraman Eric Ropiak Chris

### Mathematics of Cryptography

CHAPTER 2 Mathematics of Cryptography Part I: Modular Arithmetic, Congruence, and Matrices Objectives This chapter is intended to prepare the reader for the next few chapters in cryptography. The chapter

### Boolean Algebra Part 1

Boolean Algebra Part 1 Page 1 Boolean Algebra Objectives Understand Basic Boolean Algebra Relate Boolean Algebra to Logic Networks Prove Laws using Truth Tables Understand and Use First Basic Theorems

### Copy in your notebook: Add an example of each term with the symbols used in algebra 2 if there are any.

Algebra 2 - Chapter Prerequisites Vocabulary Copy in your notebook: Add an example of each term with the symbols used in algebra 2 if there are any. P1 p. 1 1. counting(natural) numbers - {1,2,3,4,...}

### 6.080 / 6.089 Great Ideas in Theoretical Computer Science Spring 2008

MIT OpenCourseWare http://ocw.mit.edu 6.080 / 6.089 Great Ideas in Theoretical Computer Science Spring 008 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.

### Chapter 4. Gates and Circuits. Chapter Goals. Chapter Goals. Computers and Electricity. Computers and Electricity. Gates

Chapter Goals Chapter 4 Gates and Circuits Identify the basic gates and describe the behavior of each Describe how gates are implemented using transistors Combine basic gates into circuits Describe the

### Module 3 Digital Gates and Combinational Logic

Introduction to Digital Electronics, Module 3: Digital Gates and Combinational Logic 1 Module 3 Digital Gates and Combinational Logic INTRODUCTION: The principles behind digital electronics were developed

### ENGI 241 Experiment 5 Basic Logic Gates

ENGI 24 Experiment 5 Basic Logic Gates OBJECTIVE This experiment will examine the operation of the AND, NAND, OR, and NOR logic gates and compare the expected outputs to the truth tables for these devices.

### SIMS 255 Foundations of Software Design. Complexity and NP-completeness

SIMS 255 Foundations of Software Design Complexity and NP-completeness Matt Welsh November 29, 2001 mdw@cs.berkeley.edu 1 Outline Complexity of algorithms Space and time complexity ``Big O'' notation Complexity

### Introduction to Theory of Computation

Introduction to Theory of Computation Prof. (Dr.) K.R. Chowdhary Email: kr.chowdhary@iitj.ac.in Formerly at department of Computer Science and Engineering MBM Engineering College, Jodhpur Tuesday 28 th

### Factoring & Primality

Factoring & Primality Lecturer: Dimitris Papadopoulos In this lecture we will discuss the problem of integer factorization and primality testing, two problems that have been the focus of a great amount

### Today s Topics. Primes & Greatest Common Divisors

Today s Topics Primes & Greatest Common Divisors Prime representations Important theorems about primality Greatest Common Divisors Least Common Multiples Euclid s algorithm Once and for all, what are prime

### 2 Elements of classical computer science

2 Elements of classical computer science 11 Good references for the material of this section are [3], Chap. 3, [5], Secs. 2 and 3, [7], Sec. 6.1, and [11] as a nice readable account of complexit with some

### Computational Models Lecture 8, Spring 2009

Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown Univ. p. 1 Computational Models Lecture 8, Spring 2009 Encoding of TMs Universal Turing Machines The Halting/Acceptance

### U.C. Berkeley CS276: Cryptography Handout 0.1 Luca Trevisan January, 2009. Notes on Algebra

U.C. Berkeley CS276: Cryptography Handout 0.1 Luca Trevisan January, 2009 Notes on Algebra These notes contain as little theory as possible, and most results are stated without proof. Any introductory

Chapter 11 Theory of Computation 2007 Pearson Addison-Wesley. All rights reserved Chapter 11: Theory of Computation 11.1 Functions and Their Computation 11.2 Turing Machines 11.3 Universal Programming

### 6.080 / 6.089 Great Ideas in Theoretical Computer Science Spring 2008

MIT OpenCourseWare http://ocw.mit.edu 6.080 / 6.089 Great Ideas in Theoretical Computer Science Spring 2008 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.

### Secondary Logic Functions: NAND/NOR/XOR/XNOR/Buffer

OpenStax-CNX module: m46620 1 Secondary Logic Functions: NAND/NOR/XOR/XNOR/Buffer George Self This work is produced by OpenStax-CNX and licensed under the Creative Commons Attribution License 3.0 Abstract

### Cryptography and Network Security Number Theory

Cryptography and Network Security Number Theory Xiang-Yang Li Introduction to Number Theory Divisors b a if a=mb for an integer m b a and c b then c a b g and b h then b (mg+nh) for any int. m,n Prime

### Lecture 7: NP-Complete Problems

IAS/PCMI Summer Session 2000 Clay Mathematics Undergraduate Program Basic Course on Computational Complexity Lecture 7: NP-Complete Problems David Mix Barrington and Alexis Maciel July 25, 2000 1. Circuit

### Page 1. CSCE 310J Data Structures & Algorithms. CSCE 310J Data Structures & Algorithms. P, NP, and NP-Complete. Polynomial-Time Algorithms

CSCE 310J Data Structures & Algorithms P, NP, and NP-Complete Dr. Steve Goddard goddard@cse.unl.edu CSCE 310J Data Structures & Algorithms Giving credit where credit is due:» Most of the lecture notes

### Elementary Number Theory and Methods of Proof. CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook.

Elementary Number Theory and Methods of Proof CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook.edu/~cse215 1 Number theory Properties: 2 Properties of integers (whole

### NOT AND OR XOR NAND NOR

NOT AND OR XOR NAND NOR Expression 1: It is raining today Expression 2: Today is my birthday X Meaning True False It is raining today It is not raining Binary representation of the above: X Meaning 1 It

### Mathematics of Cryptography Modular Arithmetic, Congruence, and Matrices. A Biswas, IT, BESU SHIBPUR

Mathematics of Cryptography Modular Arithmetic, Congruence, and Matrices A Biswas, IT, BESU SHIBPUR McGraw-Hill The McGraw-Hill Companies, Inc., 2000 Set of Integers The set of integers, denoted by Z,

### United States Naval Academy Electrical and Computer Engineering Department. EC262 Exam 1

United States Naval Academy Electrical and Computer Engineering Department EC262 Exam 29 September 2. Do a page check now. You should have pages (cover & questions). 2. Read all problems in their entirety.

### Factoring Polynomials

Factoring Polynomials Sue Geller June 19, 2006 Factoring polynomials over the rational numbers, real numbers, and complex numbers has long been a standard topic of high school algebra. With the advent

### New trend in Russian informatics curricula: integration of math and informatics

New trend in Russian informatics curricula: integration of math and informatics Svetlana Gaisina Academy of post-degree pedagogical education, Saint Petersburg, g.selania@gmail.com Sergei Pozdniakov Saint

### Logic Gates & Operational Characteristics

Logic Gates & Operational Characteristics NOR Gate as a Universal Gate The NOR gate is also used as a Universal Gate as the NOR Gate can be used in a combination to perform the function of a AND, OR and

### Math Review. for the Quantitative Reasoning Measure of the GRE revised General Test

Math Review for the Quantitative Reasoning Measure of the GRE revised General Test www.ets.org Overview This Math Review will familiarize you with the mathematical skills and concepts that are important

### A single register, called the accumulator, stores the. operand before the operation, and stores the result. Add y # add y from memory to the acc

Other architectures Example. Accumulator-based machines A single register, called the accumulator, stores the operand before the operation, and stores the result after the operation. Load x # into acc

### 4.203 Write the truth table for each of the following logic functions:

3e4.5 4.201 According to DeMorgan s theorem, the complement of X + Y Z is X Y +Z. Yet both functions are 1 for XYZ = 110. How can both a function and its complement be 1 for the same input combination?

### Complexity Classes P and NP

Complexity Classes P and NP MATH 3220 Supplemental Presentation by John Aleshunas The cure for boredom is curiosity. There is no cure for curiosity Dorothy Parker Computational Complexity Theory In computer

### An Innocent Investigation

An Innocent Investigation D. Joyce, Clark University January 2006 The beginning. Have you ever wondered why every number is either even or odd? I don t mean to ask if you ever wondered whether every number

### Logic Design 2013/9/5. Introduction. Logic circuits operate on digital signals

Introduction Logic Design Chapter 2: Introduction to Logic Circuits Logic circuits operate on digital signals Unlike continuous analog signals that have an infinite number of possible values, digital signals

### Theory of Computation Chapter 2: Turing Machines

Theory of Computation Chapter 2: Turing Machines Guan-Shieng Huang Feb. 24, 2003 Feb. 19, 2006 0-0 Turing Machine δ K 0111000a 01bb 1 Definition of TMs A Turing Machine is a quadruple M = (K, Σ, δ, s),

### Decimal Numbers: Base 10 Integer Numbers & Arithmetic

Decimal Numbers: Base 10 Integer Numbers & Arithmetic Digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 Example: 3271 = (3x10 3 ) + (2x10 2 ) + (7x10 1 )+(1x10 0 ) Ward 1 Ward 2 Numbers: positional notation Number

### Basic Logic Gates Richard E. Haskell

BASIC LOGIC GATES 1 E Basic Logic Gates Richard E. Haskell All digital systems are made from a few basic digital circuits that we call logic gates. These circuits perform the basic logic functions that

### 47 Numerator Denominator

JH WEEKLIES ISSUE #22 2012-2013 Mathematics Fractions Mathematicians often have to deal with numbers that are not whole numbers (1, 2, 3 etc.). The preferred way to represent these partial numbers (rational

### Digital Logic cct. Lec. (6)

THE NAND GATE The NAND gate is a popular logic element because it can be used as a universal gate: that is, NAND gates can be used in combination to perform the AND, OR, and inverter operations. The term

### WHAT ARE MATHEMATICAL PROOFS AND WHY THEY ARE IMPORTANT?

WHAT ARE MATHEMATICAL PROOFS AND WHY THEY ARE IMPORTANT? introduction Many students seem to have trouble with the notion of a mathematical proof. People that come to a course like Math 216, who certainly

### Electronic Design Automation Prof. Indranil Sengupta Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

Electronic Design Automation Prof. Indranil Sengupta Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture - 10 Synthesis: Part 3 I have talked about two-level

### Logic in Computer Science: Logic Gates

Logic in Computer Science: Logic Gates Lila Kari The University of Western Ontario Logic in Computer Science: Logic Gates CS2209, Applied Logic for Computer Science 1 / 49 Logic and bit operations Computers

### Universality in the theory of algorithms and computer science

Universality in the theory of algorithms and computer science Alexander Shen Computational models The notion of computable function was introduced in 1930ies. Simplifying (a rather interesting and puzzling)

### CAs and Turing Machines. The Basis for Universal Computation

CAs and Turing Machines The Basis for Universal Computation What We Mean By Universal When we claim universal computation we mean that the CA is capable of calculating anything that could possibly be calculated*.

### 6.080/6.089 GITCS Feb 12, 2008. Lecture 3

6.8/6.89 GITCS Feb 2, 28 Lecturer: Scott Aaronson Lecture 3 Scribe: Adam Rogal Administrivia. Scribe notes The purpose of scribe notes is to transcribe our lectures. Although I have formal notes of my

### Integers and division

CS 441 Discrete Mathematics for CS Lecture 12 Integers and division Milos Hauskrecht milos@cs.pitt.edu 5329 Sennott Square Symmetric matrix Definition: A square matrix A is called symmetric if A = A T.

### 8 Primes and Modular Arithmetic

8 Primes and Modular Arithmetic 8.1 Primes and Factors Over two millennia ago already, people all over the world were considering the properties of numbers. One of the simplest concepts is prime numbers.

### The P versus NP Solution

The P versus NP Solution Frank Vega To cite this version: Frank Vega. The P versus NP Solution. 2015. HAL Id: hal-01143424 https://hal.archives-ouvertes.fr/hal-01143424 Submitted on 17 Apr

### The Essentials of Computer Organization and Architecture. Linda Null and Julia Lobur Jones and Bartlett Publishers, 2003

The Essentials of Computer Organization and Architecture Linda Null and Julia Lobur Jones and Bartlett Publishers, 2003 Chapter 2 Instructor's Manual Chapter Objectives Chapter 2, Data Representation,

### Understanding Logic Design

Understanding Logic Design ppendix of your Textbook does not have the needed background information. This document supplements it. When you write add DD R0, R1, R2, you imagine something like this: R1

### UNIT - II LOGIC GATES AND GATES CLASSIFICATION

UNIT - II Logic Gates: Gates Classifications: Basic Gates (AND, OR, NOT), Universal Gates (NAND, NOR), Exclusive Gates (XOR, XNOR)(except circuit diagram) Logic Symbols, Logic Operators, Logical expression

### Mathematics of Cryptography Part I

CHAPTER 2 Mathematics of Cryptography Part I (Solution to Odd-Numbered Problems) Review Questions 1. The set of integers is Z. It contains all integral numbers from negative infinity to positive infinity.

### Mathematics for Computer Science/Software Engineering. Notes for the course MSM1F3 Dr. R. A. Wilson

Mathematics for Computer Science/Software Engineering Notes for the course MSM1F3 Dr. R. A. Wilson October 1996 Chapter 1 Logic Lecture no. 1. We introduce the concept of a proposition, which is a statement

### CHAPTER 5. Number Theory. 1. Integers and Division. Discussion

CHAPTER 5 Number Theory 1. Integers and Division 1.1. Divisibility. Definition 1.1.1. Given two integers a and b we say a divides b if there is an integer c such that b = ac. If a divides b, we write a

### Do not open this examination paper until instructed to do so. Section A: answer all the questions. Section B: answer all the questions.

N10/5/COMSC/HP1/ENG/TZ0/XX 88107011 Computer science HIGHER level Paper 1 Tuesday 16 November 2010 (afternoon) 2 hours 15 minutes INSTRUCTIONS TO CANDIDATES Do not open this examination paper until instructed

### Lecture 2: Universality

CS 710: Complexity Theory 1/21/2010 Lecture 2: Universality Instructor: Dieter van Melkebeek Scribe: Tyson Williams In this lecture, we introduce the notion of a universal machine, develop efficient universal

### CSE 135: Introduction to Theory of Computation Decidability and Recognizability

CSE 135: Introduction to Theory of Computation Decidability and Recognizability Sungjin Im University of California, Merced 04-28, 30-2014 High-Level Descriptions of Computation Instead of giving a Turing

### EXPERIMENT NO.1:INTRODUCTION TO BASIC GATES AND LOGIC SIMPLIFICATION TECHNIQUES

DEPARTMENT OF ELECTRICAL AND ELECTROINC ENGINEERING BANGLADESH UNIVERSITY OF ENGINEERING & TECHNOLOGY EEE 304 : Digital Electronics Laboratory EXPERIMENT NO.1:INTRODUCTION TO BASIC GATES AND LOGIC SIMPLIFICATION

### TYPES OF NUMBERS. Example 2. Example 1. Problems. Answers

TYPES OF NUMBERS When two or more integers are multiplied together, each number is a factor of the product. Nonnegative integers that have exactly two factors, namely, one and itself, are called prime

### Cryptography and Network Security Department of Computer Science and Engineering Indian Institute of Technology Kharagpur

Cryptography and Network Security Department of Computer Science and Engineering Indian Institute of Technology Kharagpur Module No. # 01 Lecture No. # 05 Classic Cryptosystems (Refer Slide Time: 00:42)

### APPLICATIONS OF THE ORDER FUNCTION

APPLICATIONS OF THE ORDER FUNCTION LECTURE NOTES: MATH 432, CSUSM, SPRING 2009. PROF. WAYNE AITKEN In this lecture we will explore several applications of order functions including formulas for GCDs and

### Introduction to Logic in Computer Science: Autumn 2006

Introduction to Logic in Computer Science: Autumn 2006 Ulle Endriss Institute for Logic, Language and Computation University of Amsterdam Ulle Endriss 1 Plan for Today Now that we have a basic understanding

### Ian Stewart on Minesweeper

Ian Stewart on Minesweeper It's not often you can win a million dollars by analysing a computer game, but by a curious conjunction of fate, there's a chance that you might. However, you'll only pick up

### Algebraic Computation Models. Algebraic Computation Models

Algebraic Computation Models Ζυγομήτρος Ευάγγελος ΜΠΛΑ 201118 Φεβρουάριος, 2013 Reasons for using algebraic models of computation The Turing machine model captures computations on bits. Many algorithms

### ELG3331: Lab 3 Digital Logic Circuits

ELG3331: Lab 3 Digital Logic Circuits What does Digital Means? Digital describes any system based on discontinuous data or events. Typically digital is computer data or electronic sampling of an analog

### 1. Convert the following base 10 numbers into 8-bit 2 s complement notation 0, -1, -12

C5 Solutions 1. Convert the following base 10 numbers into 8-bit 2 s complement notation 0, -1, -12 To Compute 0 0 = 00000000 To Compute 1 Step 1. Convert 1 to binary 00000001 Step 2. Flip the bits 11111110

### An Example of a Numerical Calculation Class - Rational Numbers

An Example of a Numerical Calculation Class - Rational Numbers Because a rational number is determined by the integer numerator and integer denominator, we defined our data structure for a rational number

### Some Minesweeper Configurations

Some Minesweeper Configurations Richard Kaye School of Mathematics The University of Birmingham Birmingham B15 2TT RWKaye@bhamacuk http://webmatbhamacuk/rwkaye/ 31st May 2007 Contents 1 Introduction 2

### Repetition and Loops. Additional Python constructs that allow us to effect the (1) order and (2) number of times that program statements are executed.

New Topic Repetition and Loops Additional Python constructs that allow us to effect the (1) order and (2) number of times that program statements are executed. These constructs are the 1. while loop and

### The program also provides supplemental modules on topics in geometry and probability and statistics.

Algebra 1 Course Overview Students develop algebraic fluency by learning the skills needed to solve equations and perform important manipulations with numbers, variables, equations, and inequalities. Students

### Faster deterministic integer factorisation

David Harvey (joint work with Edgar Costa, NYU) University of New South Wales 25th October 2011 The obvious mathematical breakthrough would be the development of an easy way to factor large prime numbers

### CPSC 211 Data Structures & Implementations (c) Texas A&M University [ 313]

CPSC 211 Data Structures & Implementations (c) Texas A&M University [ 313] File Structures A file is a collection of data stored on mass storage (e.g., disk or tape) Why on mass storage? too big to fit

### NP-Completeness and Cook s Theorem

NP-Completeness and Cook s Theorem Lecture notes for COM3412 Logic and Computation 15th January 2002 1 NP decision problems The decision problem D L for a formal language L Σ is the computational task:

### 9.2 Summation Notation

9. Summation Notation 66 9. Summation Notation In the previous section, we introduced sequences and now we shall present notation and theorems concerning the sum of terms of a sequence. We begin with a

### Chapter 11 Number Theory

Chapter 11 Number Theory Number theory is one of the oldest branches of mathematics. For many years people who studied number theory delighted in its pure nature because there were few practical applications

### Chapter 7 Uncomputability

Chapter 7 Uncomputability 190 7.1 Introduction Undecidability of concrete problems. First undecidable problem obtained by diagonalisation. Other undecidable problems obtained by means of the reduction

### 4 BOOLEAN ALGEBRA AND LOGIC SIMPLIFICATION

4 BOOLEAN ALGEBRA AND LOGIC SIMPLIFICATION BOOLEAN OPERATIONS AND EXPRESSIONS Variable, complement, and literal are terms used in Boolean algebra. A variable is a symbol used to represent a logical quantity.