What is Binary? Digital Systems and Information Representation. An Example. Physical Representation. Boolean Algebra

Similar documents
Digital Systems Overview. Unit 1 Numbering Systems. Why Digital Systems? Levels of Design Abstraction. Dissecting Decimal Numbers

2. Associative Law: A binary operator * on a set S is said to be associated whenever (A*B)*C = A*(B*C) for all A,B,C S.

10/14/2009. Reading: Hambley Chapters

CSE 20. Lecture 4: Introduction to Boolean algebra. CSE 20: Lecture4

Binary addition example worked out

EE260: Digital Design, Spring n Digital Computers. n Number Systems. n Representations. n Conversions. n Arithmetic Operations.

Classify, graph, and compare real numbers. Find and estimate square roots Identify and apply properties of real numbers.

bc7f2306 Page 1 Name:

Combinational Logic. By : Ali Mustafa

Part I, Number Systems. CS131 Mathematics for Computer Scientists II Note 1 INTEGERS

14:332:231 DIGITAL LOGIC DESIGN. Why Binary Number System?

Menu. Review of Number Systems EEL3701 EEL3701. Math. Review of number systems >Binary math >Signed number systems

MODULE- 07 : FLUIDICS AND FLUID LOGIC

BOOLEAN ALGEBRA INTRODUCTION SUBSETS

COMPLEX NUMBERS ALGEBRA 7. Dr Adrian Jannetta MIMA CMath FRAS INU0114/514 (MATHS 1) Complex Numbers 1/ 22 Adrian Jannetta

Systems I: Computer Organization and Architecture

UNSIGNED BINARY NUMBERS DIGITAL ELECTRONICS SYSTEM DESIGN WHAT ABOUT NEGATIVE NUMBERS? BINARY ADDITION 11/9/2018

Fundamentals of Digital Design

Chapter 1 CSCI

Proofs. Chapter 2 P P Q Q

Hakim Weatherspoon CS 3410 Computer Science Cornell University

Numbering Systems. Contents: Binary & Decimal. Converting From: B D, D B. Arithmetic operation on Binary.

Note: The area of logic that deals with propositions is called the propositional calculus or propositional logic.

MA 180 Lecture. Chapter 0. College Algebra and Calculus by Larson/Hodgkins. Fundamental Concepts of Algebra


Doc112: Hardware. Department of Computing, Imperial College London. Doc112: Hardware Lecture 1 Slide 1

Binary Logic and Gates. Our objective is to learn how to design digital circuits.

Proofs. Chapter 2 P P Q Q

P.6 Complex Numbers. -6, 5i, 25, -7i, 5 2 i + 2 3, i, 5-3i, i. DEFINITION Complex Number. Operations with Complex Numbers

4 Switching Algebra 4.1 Axioms; Signals and Switching Algebra

Signals and Systems Digital Logic System

Equational Logic and Term Rewriting: Lecture I

Boolean algebra. Values

Intro To Digital Logic

CSE 20 Discrete Math. Algebraic Rules for Propositional Formulas. Summer, July 11 (Day 2) Number Systems/Computer Arithmetic Predicate Logic

Grade 7/8 Math Circles Winter March 20/21/22 Types of Numbers

Identify the specified numbers by circling. 1) The integers in the following list: 8 16, 8, -10, 0, 9, - 9

Boolean Algebra. Digital Logic Appendix A. Postulates, Identities in Boolean Algebra How can I manipulate expressions?

Binary Logic and Gates

CS61c: Representations of Combinational Logic Circuits

Digital Logic Appendix A

THE TEACHER UNDERSTANDS THE REAL NUMBER SYSTEM AND ITS STRUCTURE, OPERATIONS, ALGORITHMS, AND REPRESENTATIONS

Boolean Algebra & Logic Gates. By : Ali Mustafa

Boolean algebra. Examples of these individual laws of Boolean, rules and theorems for Boolean algebra are given in the following table.

Complex Numbers. The Imaginary Unit i

THE TEACHER UNDERSTANDS THE REAL NUMBER SYSTEM AND ITS STRUCTURE, OPERATIONS, ALGORITHMS, AND REPRESENTATIONS

Chapter 1: Foundations for Algebra

A. Incorrect! Apply the rational root test to determine if any rational roots exist.

3.9 My Irrational and Imaginary Friends A Solidify Understanding Task

Switches: basic element of physical implementations

Boolean Algebra. Digital Logic Appendix A. Boolean Algebra Other operations. Boolean Algebra. Postulates, Identities in Boolean Algebra

DSP Design Lecture 2. Fredrik Edman.

ECE260: Fundamentals of Computer Engineering

Complex Numbers: Definition: A complex number is a number of the form: z = a + bi where a, b are real numbers and i is a symbol with the property: i

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN. Week 2 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering

ECE/CS 250 Computer Architecture

Why digital? Overview. Number Systems. Binary to Decimal conversion

Skills Practice Skills Practice for Lesson 4.1

THE LOGIC OF COMPOUND STATEMENTS

CSE 20. Final Review. CSE 20: Final Review

Four Important Number Systems

Combinational Logic Design Principles

Conversions between Decimal and Binary

ECE 250 / CPS 250 Computer Architecture. Basics of Logic Design Boolean Algebra, Logic Gates

THE TEACHER UNDERSTANDS THE REAL NUMBER SYSTEM AND ITS STRUCTURE, OPERATIONS, ALGORITHMS, AND REPRESENTATIONS

CSE 140L Spring 2010 Lab 1 Assignment Due beginning of the class on 14 th April

CISC 1400 Discrete Structures

n n P} is a bounded subset Proof. Let A be a nonempty subset of Z, bounded above. Define the set

CSE 20 DISCRETE MATH. Fall

20. Combinational Circuits

UC Berkeley College of Engineering, EECS Department CS61C: Representations of Combinational Logic Circuits

CHAPTER 7. Exercises 17/ / /2 2 0

Sample Problems for all sections of CMSC250, Midterm 1 Fall 2014

CprE 281: Digital Logic

Outline Goals and Assumptions Real Numbers Rational and Irrational. L11: Numbers. Alice E. Fischer

Chapter 1: Foundations for Algebra

Lecture 2. The Euclidean Algorithm and Numbers in Other Bases

Computer Organization: Boolean Logic

NAME DATE PERIOD. A negative exponent is the result of repeated division. Extending the pattern below shows that 4 1 = 1 4 or 1. Example: 6 4 = 1 6 4

Complement Arithmetic

CHAPTER 2 INTRODUCTION TO CLASSICAL PROPOSITIONAL LOGIC

Intro to Algebra Today. We will learn names for the properties of real numbers. Homework Next Week. Due Tuesday 45-47/ 15-20, 32-35, 40-41, *28,29,38

Schedule. ECEN 301 Discussion #25 Final Review 1. Date Day Class No. 1 Dec Mon 25 Final Review. Title Chapters HW Due date. Lab Due date.

E40M. Binary Numbers. M. Horowitz, J. Plummer, R. Howe 1

Some Review Problems for Exam 1: Solutions

Algebra 2 Notes AII.7 Polynomials Part 2

Designing Information Devices and Systems II Spring 2018 J. Roychowdhury and M. Maharbiz Discussion 1A

Computer organization

Chapter 2: Switching Algebra and Logic Circuits

Numbers and Arithmetic

August 27, Review of Algebra & Logic. Charles Delman. The Language and Logic of Mathematics. The Real Number System. Relations and Functions

Give algebraic and numeric examples to support your answer. Which property is demonstrated when one combines like terms in an algebraic expression?

Digital Systems and Information Part II

Conservation of Information

SEVENTH EDITION and EXPANDED SEVENTH EDITION

CSE 20 DISCRETE MATH. Winter

Unit 4: Computer as a logic machine

Slide Set 3. for ENEL 353 Fall Steve Norman, PhD, PEng. Electrical & Computer Engineering Schulich School of Engineering University of Calgary

Chapter 1: Preliminaries and Error Analysis

Basic Logic and Proof Techniques

Transcription:

What is Binary? Digital Systems and Information Representation CSE 102 Underlying base signals are two valued: 0 or 1 true or false (T or F) high or low (H or L) One bit is the smallest unambiguous unit of information Propositional calculus helps us manipulate (operate on) these base signals Operations in Propositional Calculus An Example AND OR NOT a b = c c is true if a is true and b is true a + b = c c is true if a is true or b is true a = b b is true if a is false a passed microeconomics course b passed macroeconomics course c passed economics survey course d met economics requirement d = a b + c Boolean Algebra Physical Representation Boolean algebra (named after 19 th century mathematician George Boole) lets us manipulate and reason about expressions of propositional calculus Systems based on this algebraic theory are called digital logic systems All modern computer systems fall in this category Positive logic convention Binary value (1 or 0) is represented by the voltage on a wire (H or L) true, 1 voltage greater than threshold V H false, 0 voltage less than threshold V L Voltage gap between V H and V L provides safety margin to limit errors 1

That s Not Enough! We are interested in representing signals that have more than just two values numbers text images audio video and much more Let s look at a sequence of number systems (unveiling some history in the process) Start with counting numbers 1, 2, 3, (positive integers) good at measuring how much stuff I have e.g., 7 cows and 2 goats closed under addition and multiplication if a,b are numbers, a + b is too if a,b are numbers, a b is too What if I don t have any stuff? incorporate 0 into number system I have 0 pigs still closed under addition and multiplication how do we represent zero in Roman numerals? we don t! the Romans hadn t yet invented zero What if I take away more than I have? new concept: negative numbers I owe my neighbor 3 chickens, vs. I own 3 chickens closed under subtraction as well can solve equation x + a = 0 for any integer a Why can t I divide my stuff 3 ways? incorporate rational numbers I have 2 pigs, so when I die each of my 3 sons gets 2/3 pig now closed under division can now solve equation ax + b = 0 for arbitrary numbers a,b if a 0 How long is this line? incorporate irrational numbers defined real numbers can now solve equation x 2 2 = 0 Note pattern of names: positive to negative rational to irrational 2

But what about x 2 + 2 = 0? introduce complex numbers vector number system with 2 components: (a, b) a, b both real numbers obey following rules: equality: (a, b) = (c, d) iff a = c and b = d addition: (a, b) + (c, d) = (a + c, b + d) multiplication: (a, b) (c, d) = (ac bd, ad + bc) Interesting fact complex numbers with 2 nd component equal 0 have same properties as real numbers (a, 0) = (c, 0) iff a = c (a, 0) + (c, 0) = (a + c, 0) (a, 0) (c, 0) = (ac, 0) What name to use? 1 st component of complex number is called real, why not follow the historical naming conventions? positive negative rational irrational real imaginary therefore, 2 nd component of complex number came to be called imaginary Back to our equation What about the equation we were trying to solve? x 2 + 2 = 0 First, rewrite as equation in complex numbers x 2 + (2,0) = (0,0) Second, insert x = (0, 2) (0, 2) 2 + (2, 0) = (0, 2) (0, 2) + (2, 0) = ( 2, 0) + (2, 0) = (0, 0) Another interesting equation: x 2 + 1 = 0 Initial algebraic manipulation yields: x 2 + 1 = 0 x 2 = 1 x = 1 Now try with x = (0,1): (0, 1) 2 + (1, 0) = (0, 1) (0, 1) + (1, 0) = ( 1, 0) + (1, 0) = (0, 0) Therefore, x = (0, 1) = 1 New notation for complex numbers Let symbol i= 1 (a, b) can now be written a + ib since a + ib = (a, 0) + (0, 1) (b, 0) = (a, 0) + (0, b) = (a, b) Note: EEs use j = 1, the rest of the known universe uses i= 1. Why is that? 3

How powerful are complex numbers? We now have a number system rich enough to solve arbitrary constant coefficient polynomial equations: a 0 x n + a 1 x n 1 + + a n 1 x + a n = 0 If a s complex valued, n 1, and a 0 0, there are precisely n roots in complex number system Fundamental Theorem of Algebra How do we represent these numbers? A positional number system lets us represent integers. E.g., in base 10: xyz 10 = x 10 2 + y 10 1 + z 10 0 = x 100 + y 10 + z x, y, z can each have 10 possible values: 0 to 9 Base 2 (binary) works the same way xyz 2 = x 2 2 + y 2 1 + z 2 0 = x 4 + y 2 + z x, y, z can each have 2 possible values: 0 or 1 each digit is called a bit e.g., 000 0 001 1 010 2 011 3 100 4 101 5 110 6 111 7 Negative numbers With a fixed number of bits, one can represent negative numbers in a variety of ways. E.g., 4 bit binary number system: unsigned range 0 to 15 (0000 to 1111) unsigned integers with n bits range 0 to 2 n 1 offset or bias (e.g., 7) range 7 to 8 subtract fixed amount (such as midpoint value) generally bad for computation 4 bit Sign Magnitude 1 st bit encodes sign (0 = positive, 1 = negative) bits 2, 3, 4 magnitude range 0 to 7 (000 to 111) overall range 7 to +7 what about 1000? 0! with n bits, use n 1 bits for magnitude range (2 n 1 1) to +(2 n 1 1) issues: two representations for 0, +0 and 0 need significant hardware to support add, subtract 2 s (radix) complement Use negative weight for 1 st bit: wxyz = w (2) 3 + x 2 2 + y 2 1 + z 2 0 = w (8) + x 4 + y 2 + z overall range 8 to +7 1 st bit is still sign bit, with 0 = positive and 1 = negative only one zero: 0000 4

Properties of 2 s complement least significant n 1 bits have unaltered meaning (i.e., standard positional notation and weights apply) most significant bit has weight negated (instead of weight 2 n 1, it is weight 2 n 1 ) range (2 n 1 ) to +(2 n 1 1) binary decimal 000 0 001 1 010 2 011 3 100 4 101 5 110 6 111 7 2 in 4 bit 2 s complement notation? negation operation: flip all bits, add 1, throw away carry 5