P. 1
Digital Basics

Digital Basics

|Views: 1|Likes:
Published by sivar22

More info:

Published by: sivar22 on Jul 01, 2013
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

05/05/2015

pdf

text

original

Department of Computing First Year Computer Hardware Course

Lecturers
Duncan Gillies and Alessio Lomuscio

Aims of the course By the end of the course you will have gained: 1) an understanding to Boolean algebra and its relationship with basic logical gates and combinatorial circuits. 2) knowledge of various types of flip-flops and their relations with RAM. 3) basic expertise in designing and analysing simple circuits such as counters also by means of translations into finite state machines. 4) Practical skills in use of VLSI design tools to engineer basic circuits.
Computer Hardware Introduction Slide2

Tutors
Vrizlynn Thing Andrew Huntbatch Timothy Todman David Thomas

Computer Hardware Introduction Slide1

Lectures
The course will begin with Boolean Algebra, and will end with the design of a thirty-two bit computer. The first twelve lectures focus on techniques for the design of digital circuits. The last six lectures will be concerned with the design of a computer.

Tutorials
Tutorials will serve three purposes: 1. They will provide design examples to reinforce understanding of the lecture material. 2. The provide a venue to discuss problems with the tutors and lecturers. 3. They will give valuable practice in answering examination style problems.

Computer Hardware Introduction Slide3

Computer Hardware Introduction Slide4

Tutorial Assessment
All tutorials (except the first) will be collected, marked and returned the next week. This is to encourage you to attend and to give you some indication of how well you are progressing. NB The tutorials are not exams, you can work in groups, and discuss the problems with your friends and the tutors.
Computer Hardware Introduction Slide5

Coursework
A design exercise will be given out at the end of week three. You will need to complete it by week six. Submission will be in the form of a short report plus a circuit design which you can test with a simulator. The total continuous assessment mark for the course comprises:
Tutorial marks 40% Design Exercise 60%
Computer Hardware Introduction Slide6

(www. Books The best advice about books is: Don’t buy anything until you are sure you need it.uk/~dfg).ac. Computer Hardware Introduction Slide7 Computer Hardware Introduction Slide8 Web based material All lecture notes. so there is no need to print your own. but binary arithmetic is much older than computers Ancient Chinese Civilisation (3000 BC) Ancient Greek Civilisation (1000 BC) Boolean Algebra (1850) Propositional Logic The Ancient Greek philosophers created a system to formalise arguments called propositional logic. Photocopies will be given out during the lectures. OR and NOT Computer Hardware Lecture 1 Slide11 Computer Hardware Lecture 1 Slide12 . Tutorial solutions will be posted on the page above a few days after each tutorial. The notes that will be given out are comprehensive and should cover all the material. tutorial problem sheets. A proposition is a statement that could be TRUE or FALSE Propositions could be compounded by means of the operators AND. and coursework instructions will be made available from the course web page.Laboratory exercise A longer exercise will be included as part of your laboratory work. Computer Hardware Introduction Slide9 Lecture 1: Introduction to Boolean Algebra Computer Hardware Lecture 1 Slide10 George Boole: 1815-1864 Binary Systems Computer hardware works with binary numbers.ic. This will be set during term 2.doc.

Truth Tables Since propositions can only take two values. for example: I will take an umbrella if and only if it is raining OR the weather forecast is bad In other words the proposition “I will take an umbrella” is the result of the Boolean combination (OR) between raining and weather forecast being bad. In fact we could write: I will take an umbrella = it is raining OR the weather forecast is bad Computer Hardware Lecture 1 Slide14 A combined proposition: it is raining OR the weather forecast is bad Computer Hardware Lecture 1 Slide13 Diagrammatic representation We can think of the umbrella proposition as a result that we calculate from the weather forecast and the fact that it is raining by means of a logical or. we can express all possible outcomes of the umbrella proposition by a table: Raining FALSE FALSE TRUE TRUE Bad Forecast FALSE TRUE FALSE TRUE Umbrella FALSE TRUE TRUE TRUE Rain Bad Weather Forecast OR Take Umbrella Computer Hardware Lecture 1 Slide15 Computer Hardware Lecture 1 Slide16 More complex propositions We can make our propositions more complex. for example: (Take Umbrella ) = ( NOT (Take Car ) ) AND ( (Bad Forecast ) OR (Raining ) ) Raining Bad Forecast Car OR NOT AND and as before represent this diagrammatically Take Umbrella Computer Hardware Lecture 1 Slide17 Computer Hardware Lecture 1 Slide18 .Propositional Calculus Example Propositions may be TRUE or FALSE: it is raining the weather forecast is bad Propositional Calculus Example We can assign values to propositions.

) OPERATOR NOT AND OR SYMBOL ' • + PRECEDENCE Highest Middle Lowest Is formalised by the simpler equation: U = (C')•(W+R) Computer Hardware Lecture 1 Slide21 U = (C')•( W+R ) = C' •(W+R). For n variables there are 2n possibilities. but more succinct notation. or connectives that we intend to use.Boolean Algebra We could write propositional statements as above but to perform calculations quickly and efficiently we can use an equivalent. Computer Hardware Lecture 1 Slide19 Fundamentals of Boolean Algebra The truth values are replaced by 1 and 0: 1 = TRUE 0 = FALSE Propositions are replaced by variables: R = it is raining W = The weather forecast is bad Operators are replaced by symbols ' = NOT + = OR • = AND Computer Hardware Lecture 1 Slide20 Precedence Our previous complex proposition: Take Umbrella = ( NOT (Take Car ) ) AND ( Bad Forecast OR Raining ) Further simplification is introduced by defining a precedence for the evaluation of the operators. Computer Hardware Lecture 1 Slide22 Truth Tables All possible outcomes of the operators can be written as truth tables AND • A B R 0 0 0 0 1 0 1 0 0 1 1 1 OR + A B 0 0 0 1 1 0 1 1 NOT ' A R 0 1 1 0 Truth tables can be constructed for any function Given any Boolean expression eg: U = C' •(W+R) We can calculate a truth table for every possible value of the variables on the right hand side. R 0 1 1 1 Computer Hardware Lecture 1 Slide23 Computer Hardware Lecture 1 Slide24 . We also need a to have a well-defined semantics for all the “operators”. So note that C' •(W+R) is not the same as C' •W+R. (The highest precedence operator is evaluated first. The system we will employ is called Boolean Algebra (introduced by the English mathematician Boole in 1850) and satisfies the criteria above.

for example. concerning negation and its interaction with and/or: (A')' = A A•A' = 0 A + A' = 1 These may be verified by construction a truth table. Computer Hardware Lecture 1 Slide27 Computer Hardware Lecture 1 Slide28 The normal laws of algebra apply Associative (A•B)•C = A•(B•C) (A+B)+C = A+(B+C) Simplification Rules Simplification rules allow us to reduce the complexity of a Boolean expression: The first type of simplification rule concerns single variables: A•A = A A+A = A Commutative A•B = B•A A+B = B+A Distributive A•(B+C) = A•B + A•C A+(B•C) = (A+B)•(A+C) (strange but true!) Computer Hardware Lecture 1 Slide29 Computer Hardware Lecture 1 Slide30 .The truth table for “Umbrella” R W C 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 Inputs X1=R+W X2=C' U=X1•X2 0 1 0 0 0 0 1 1 1 1 0 0 1 1 1 1 0 0 1 1 1 1 0 0 Partial Results Outputs Problem Break Using Boolean algebra construct a truth table to enumerate all possible values of: R = A • B + C' A 0 0 0 B 0 0 1 C 0 1 0 A•B C' R etc Computer Hardware Lecture 1 Slide25 Computer Hardware Lecture 1 Slide26 Solution A 0 0 0 0 1 1 1 1 B 0 0 1 1 0 0 1 1 C 0 1 0 1 0 1 0 1 A•B 0 0 0 0 0 0 1 1 C' 1 0 1 0 1 0 1 0 R 1 0 1 0 1 0 1 1 Algebraic Manipulation One purpose of an algebra is to manipulate expressions without necessarily evaluating them. Boolean algebra has many manipulation rules.

..+ X' Computer Hardware Lecture 1 Slide33 Computer Hardware Lecture 1 Slide34 The principle of Duality Every Boolean equation has a dual. or by direct proof as follows: A + A•B = A•(1+B) A•(1+B) = A•1 A•1 = A (Distributive law) (Simplification rule with 1 and 0) (Simplification rule with 1 and 0) Computer Hardware Lecture 1 Slide32 de Morgan’s Theorem Two of the most used simplification rules come from de Morgan’s theorem: (A+B)' = A' • B' (A•B)' = A' + B' Note that (as before) A and B can be any Boolean expression Generalising de Morgan’s theorem: The theorem holds for any number of terms..•X)' = A' + B' + C' + . which is found by replacing the AND operator with OR and vice versa: We saw one example in de Morgan’s theorem: (A+B)' = A' • B' (A•B)' = A' + B' The dual of a simplification rule The simplification rule A + A• B = A Has a dual equation A • (A + B) = A Note that the brackets are added to maintain the evaluation order proof A • (A + B) = A•A + A•B A•A + A•B = A + A•B A + A•B = A Computer Hardware Lecture 1 Slide36 Computer Hardware Lecture 1 Slide35 . Thus (P • (Q+R') + S) • 0 = 0 Computer Hardware Lecture 1 Slide31 More general simplification rules There are many possible simplification rules involving more than one variable......Simplification rules with 1 and 0 A•0=0 A•1=A A+0=A A+1=1 Note that here (as in all simplification rules) A and B can be any boolean expression. so: (A+B+C)' = ( (A+B)+C)' ( (A+B)+C)' = ( (A+B)' ) • C' ( (A+B)' ) • C' = A' • B' • C' and similarly: (A•B•C. We will look at just one: A + A•( B ) = A It is possible to prove this by construction a truth table.

in propositional logic: I will not take the umbrella = I am going by car OR the weather forecast is good AND it is not raining! Computer Hardware Lecture 1 Slide38 Computer Hardware Lecture 1 Slide37 .Complement expressions Boolean equations also have a complement found by negating both sides: U = C' •(W+R) Simplification with de Morgan U' = (C' •(W+R))' Can be simplified using de Morgan’s theorem (C' •(W+R))' = C + (W+R)' C + (W+R)' = C + W' • R' Has a complement equation U' = (C' •(W+R))' or.

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->