1 Survey of Computer Science CSCI 110, Spring 2011 Lecture 16 Digital Circuits, binary Numbers.

Slides:



Advertisements
Similar presentations
Logic Gates A logic gate is an elementary building block of a digital circuit Most logic gates have two inputs and one output At any given moment, every.
Advertisements

Computer Science 210 Computer Organization Introduction to Logic Circuits.
Chapter 4: The Building Blocks: Binary Numbers, Boolean Logic, and Gates Invitation to Computer Science, Java Version, Third Edition.
Digital Fundamentals Floyd Chapter 2 Tenth Edition
CSC 110 – Intro to Computing Lecture 14: Midterm Review.
Introduction to Computer Engineering ECE/CS 252, Fall 2010 Prof. Mikko Lipasti Department of Electrical and Computer Engineering University of Wisconsin.
Number Systems & Logic Gates Day 2. Octal Number System Base (Radix)8 Digits0, 1, 2, 3, 4, 5, 6, 7 e.g = =648 1 =88 0 =1 The digit.
Binary Numbers.
3. DIGITAL ELECTRONICS..
(2.1) Fundamentals  Terms for magnitudes – logarithms and logarithmic graphs  Digital representations – Binary numbers – Text – Analog information 
Chapter 1 Basic Principles of Digital Systems. 2 Analog vs. Digital Analog: –A way of representing a physical quantity by a proportional continuous voltage.
Engineering Lecture 3 Digital Electronics by Jaroslaw Karcz.
Module 3.  Binary logic consists of :  logic variables  designated by alphabet letters, e.g. A, B, C… x, y, z, etc.  have ONLY 2 possible values:
CPSC 171 Introduction to Computer Science Boolean Logic, Gates, & Circuits.
CS101 Introduction to Computing Lecture 8 Binary Numbers & Logic Operations.
Binary Numbers.
XOR and XNOR Logic Gates. XOR Function Output Y is TRUE if input A OR input B are TRUE Exclusively, else it is FALSE. Logic Symbol  Description  Truth.
Lecture 7 How computers process data (Number Systems) PRESENTED BY MD. MAHBUBUL ALAM, PHD 1.
Fundamentals of IT UNIT-I OnlyforIPMCA. DIGITAL SIGNALS & LOGIC GATES Signals and data are classified as analog or digital. Analog refers to something.
Compsci Today’s topics l Binary Numbers  Brookshear l Slides from Prof. Marti Hearst of UC Berkeley SIMS l Upcoming  Networks Interactive.
INTRODUCTION TO COMPUTING LECTURE#04. TRANSFORMING DATA INTO INFORMATION Understands only two states either On or Off  Makes different patterns of 0s.
1 DLD Lecture 18 Recap. 2 Recap °Number System/Inter-conversion, Complements °Boolean Algebra °More Logic Functions: NAND, NOR, XOR °Minimization with.
1 CS103 Guest Lecture Number Systems & Conversion Bitwise Logic Operations.
Digital Logic Design Week 3
Binary Number System & Logic Operations. The focus of the last lecture was on the microprocessor During that lecture we learnt about the function of the.
Compsci Today’s topics l Binary Numbers  Brookshear l Slides from Prof. Marti Hearst of UC Berkeley SIMS l Upcoming  Networks Interactive.
1 EG 32 Digital Electronics Thought for the day You learn from your mistakes..... So make as many as you can and you will eventually know everything.
Lecture 1: 8/27/2002CS170 Fall CS170 Computer Organization and Architecture I Ayman Abdel-Hamid Department of Computer Science Old Dominion University.
Data Representation Bits, Bytes, Binary, Hexadecimal.
How Computer Represent Data
Binary01.ppt Decimal Decimal: Base 10 means 10 Unique numerical digits ,00010,000 Weight Positions 3,
CMP 100 Introduction to Computing Lecture Binary Numbers & Logic Operations.
1 Ethics of Computing MONT 113G, Spring 2012 Session 1 Digital Circuits, binary Numbers Course webpage:
1. Computing Systems Lecture 3 Binary Representation & Boolean Logic Binary and Logic 2.
Logic Design EE-2121 Manesh T. Digital Systems  Introduction  Binary Quantities and Variables  Logic Gates  Boolean Algebra  Combinational Logic.
The Hexadecimal System is base 16. It is a shorthand method for representing the 8-bit bytes that are stored in the computer system. This system was chosen.
Computing Systems Lecture 3 Binary Representation & Boolean Logic Binary and Logic 1.
LOGIC CIRCUITLOGIC CIRCUIT. Goal To understand how digital a computer can work, at the lowest level. To understand what is possible and the limitations.
 A transistor is the basic building block of electronic components.  The average computer may have millions of them within its circuits.  Essentially,
LOGIC GATES. INTRODUCTION TO LOGIC GATES Boolean functions may be practically implemented by using electronic gates. The following points are important.
Invitation to Computer Science, C++ Version, Fourth Edition
Truth Table to Statement Form
Morgan Kaufmann Publishers
Digital Logic and Computer Organization
Introduction Molecules: made up of atoms of individual elements.
The Binary Number System
Basic Logical Operations (Fascinating)
KS4 Electricity – Electronic systems
KS4 Electricity – Electronic systems
Digital Signals Digital Signals have two basic states:
Fundamentals & Ethics of Information Systems IS 201
University of Gujrat Department of Computer Science
Invitation to Computer Science, Java Version, Third Edition
Computer Science 210 Computer Organization
Schematics 201 Lecture Topic: Electrical Symbols
Number Systems Decimal (base 10) { }
For OCR GCSE Computing Unit 1 - Theory
Logic Gates.
JC Technology Logic Gates.
Chapter 2: Number Systems
13 Digital Logic Circuits.
GCSE Computer Science – Logic Gates & Boolean Expressions
DIGITAL ELECTRONICS B.SC FY
Logic Gates.
Binary Logic.
Chapter Four Data Representation in Computers By Bezawit E.
Truth tables Mrs. Palmer.
Binary, Hexadecimal, and Base 10.
Digital and Microprocessor Technique I
Presentation transcript:

1 Survey of Computer Science CSCI 110, Spring 2011 Lecture 16 Digital Circuits, binary Numbers

2 Church-Markov-Turing Thesis Any non-trivial computer language is apparently capable of computing no more and no fewer functions than all other non-trivial programming languages. So, all languages are equally powerful. (There may be other reasons for choosing one language over another depending on the needs of the application).

3 Information on Computers We use computers to represent many different kinds of information: Numbers Symbols (letters, punctuation, etc.) Pictures Sound Program instructions Etc. We divide this information into different categories. The computer stores everything as 1's and 0's (binary representation).

4 Binary Information Computers represent all information as 0's and 1's (Binary representation). All the pictures, sounds, programs, etc. on your computer are stored as sets of 0's and 1's! Why? Computers are built using digital circuits. The inputs and outputs of digital circuits can only be one of two values: true (high voltage) or false (low voltage). We represent these as 1 and 0. By combining 1's and 0's in different patterns and sequences, we can represent complex information and compute solutions to some complex problems

5 Digital Electronics Each digital component can have only 1 of two states. High Voltage (+ 5V) = 1 Low Voltage (0 V) = 0 Basic components: Logic display (LED) => lights up when voltage high (1) Doesn't light when voltage low(0) Digital switch => Sends high voltage (1) when up Sends low voltage (0) when down

6 AND Gate An AND Gate takes two inputs and produces 1 output. Depending on the values of the inputs, s1 and s2, the LED will either light up or not. Truth Table: s1s2output output = s1 AND s2 = s1  s2

7 Other Gates Other useful gates: OR GateInverter NOR Gate NAND Gate XOR (Exclusive OR) Gate s1 V s2s1 (s1  s2) (s1 V s2)

8 Combining Gates A three input AND: Truth table: a b c z Practice: Draw a three input OR circuit and write out the truth table.

9 Counting in Base 10 In the decimal number system (base 10), we use 10 digits We count until we run out of digits, and then add a new place with value place value = 10place value = 1 We continue to count, adding 1 to the 10's place every 10th number. When we run out of digits for the 10's place, we add a new place with value 10 2 (or 100) place value = 100

10 Counting in Binary With binary numbers, we have only 2 digits to work with (0 and 1), so we add places more frequently. Each new place has a value that is a power of two. DecimalBinary Note: Each 1 or 0 is called a binary digit or bit.

11 Base 10 vs. Base 2 In base 10, each place represents a power of 10: 4173 = ? 4 x x x x 10 0 In base 2, each place represents a power of 2: = ? 1 x x x x x 2 0 = 22 Practice: Convert from binary to decimal.

12 Converting from Decimal to Binary--Method 1 To convert from decimal to binary, we first find the largest power of 2 that divides our decimal number. We divide by that number and put the result in the binary place associated with that power of two. We then repeat with the remainder from the previous division. Example: Convert 25 (base 10) to binary. The largest power of 2 that divides 25 is /16 = 1R = 9 9/8 = 1R = 1 1/4 = 0R = 1 1/2 = 0R = 1 1/1 = 1R = 0 Binary number = 11001

13 Converting from Decimal to Binary--Method 2 Method 2: Divide repeatedly by 2. Place remainders in order from right to left. Example: 25/2 = 12R = 1 12/2 = 6R = 0 6/2 = 3R = 0 3/2 = 1R = 1 1/2 = 0R = 1 Result = Practice: What is 43 written in base 2?

14 Hexadecimal Numbers Hexadecimal numbers use base 16. To count in base 16, we use the letters A - F to stand for decimal equivalents of Base 10Base 16Base 10Base FF A 11B 12C 13D 14E 15F = 256

15 Converting from Binary to Hexadecimal Every 4 bits represents 1 hexadecimal digit. To convert from binary to Hexadecimal, group the bits into sets of four (from right to left) and find the corresponding hexadecimal digit for each set of 4 bits B ? ?