Today s topics. Digital Computers. More on binary. Binary Digits (Bits)



Similar documents
Section 1.4 Place Value Systems of Numeration in Other Bases

Data Storage. Chapter 3. Objectives. 3-1 Data Types. Data Inside the Computer. After studying this chapter, students should be able to:

Binary Adders: Half Adders and Full Adders

Computer Science 281 Binary and Hexadecimal Review

Data Storage 3.1. Foundations of Computer Science Cengage Learning

Digital System Design Prof. D Roychoudhry Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

CDA 3200 Digital Systems. Instructor: Dr. Janusz Zalewski Developed by: Dr. Dahai Guo Spring 2012

Binary Numbers. Binary Octal Hexadecimal

Cyber Security Workshop Encryption Reference Manual

Base Conversion written by Cathy Saxton

APPENDIX B. Routers route based on the network number. The router that delivers the data packet to the correct destination host uses the host ID.

Gates, Circuits, and Boolean Algebra

Lecture 2. Binary and Hexadecimal Numbers

encoding compression encryption

The string of digits in the binary number system represents the quantity

CSI 333 Lecture 1 Number Systems

Binary Representation

Oct: 50 8 = 6 (r = 2) 6 8 = 0 (r = 6) Writing the remainders in reverse order we get: (50) 10 = (62) 8

Binary Representation. Number Systems. Base 10, Base 2, Base 16. Positional Notation. Conversion of Any Base to Decimal.

Solution for Homework 2

Chapter 4: Computer Codes

2 Number Systems. Source: Foundations of Computer Science Cengage Learning. Objectives After studying this chapter, the student should be able to:

Data Storage. 1s and 0s

Number Representation

Levent EREN A-306 Office Phone: INTRODUCTION TO DIGITAL LOGIC

=

EE 261 Introduction to Logic Circuits. Module #2 Number Systems

Decimal Number (base 10) Binary Number (base 2)

2010/9/19. Binary number system. Binary numbers. Outline. Binary to decimal

CS101 Lecture 11: Number Systems and Binary Numbers. Aaron Stevens 14 February 2011

Comparison of different image compression formats. ECE 533 Project Report Paula Aguilera

Positional Numbering System

Lecture 11: Number Systems

NUMBER SYSTEMS. William Stallings

LSN 2 Number Systems. ECT 224 Digital Computer Fundamentals. Department of Engineering Technology

Counting in base 10, 2 and 16

Numeral Systems. The number twenty-five can be represented in many ways: Decimal system (base 10): 25 Roman numerals:

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

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

COMBINATIONAL CIRCUITS

Circuits and Boolean Expressions

Decimal to Binary Conversion

2011, The McGraw-Hill Companies, Inc. Chapter 3

Memory is implemented as an array of electronic switches

Chapter 1: Digital Systems and Binary Numbers

CSE140: Components and Design Techniques for Digital Systems. Introduction. Prof. Tajana Simunic Rosing

Count the Dots Binary Numbers

Compression techniques

Logic in Computer Science: Logic Gates

plc numbers Encoded values; BCD and ASCII Error detection; parity, gray code and checksums

Upon completion of unit 1.1, students will be able to

Useful Number Systems

Let s put together a Manual Processor

Digital Electronics Detailed Outline

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

Number Systems. Introduction / Number Systems

Binary Division. Decimal Division. Hardware for Binary Division. Simple 16-bit Divider Circuit

Lecture 8: Binary Multiplication & Division

Understanding Logic Design

Basic Logic Gates Richard E. Haskell

Content Map For Career & Technology

HOMEWORK # 2 SOLUTIO

6 The Hindu-Arabic System (800 BC)

Chapter 7 Lab - Decimal, Binary, Octal, Hexadecimal Numbering Systems

Goals. Unary Numbers. Decimal Numbers. 3,148 is s 100 s 10 s 1 s. Number Bases 1/12/2009. COMP370 Intro to Computer Architecture 1

Number Conversions Dr. Sarita Agarwal (Acharya Narendra Dev College,University of Delhi)

Digital Design. Assoc. Prof. Dr. Berna Örs Yalçın

Numbering Systems. InThisAppendix...

CPEN Digital Logic Design Binary Systems

Machine Architecture and Number Systems. Major Computer Components. Schematic Diagram of a Computer. The CPU. The Bus. Main Memory.

Image Compression through DCT and Huffman Coding Technique

Sheet 7 (Chapter 10)

3201 Computer Networks 2014/2015 Handout: Subnetting Question

FORDHAM UNIVERSITY CISC Dept. of Computer and Info. Science Spring, Lab 2. The Full-Adder

Numeration systems. Resources and methods for learning about these subjects (list a few here, in preparation for your research):

THE BINARY NUMBER SYSTEM

Today. Binary addition Representing negative numbers. Andrew H. Fagg: Embedded Real- Time Systems: Binary Arithmetic

The Subnet Training Guide

Two's Complement Adder/Subtractor Lab L03

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

Pemrograman Dasar. Basic Elements Of Java

CS321. Introduction to Numerical Methods

The programming language C. sws1 1

Digital codes. Resources and methods for learning about these subjects (list a few here, in preparation for your research):

Information, Entropy, and Coding

Systems I: Computer Organization and Architecture

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

Chapter 2 Logic Gates and Introduction to Computer Architecture

Binary Number System. 16. Binary Numbers. Base 10 digits: Base 2 digits: 0 1

Binary, Hexadecimal, Octal, and BCD Numbers

COMPSCI 210. Binary Fractions. Agenda & Reading

(1) /30 (2) /30 (3) /40 TOTAL /100

The use of binary codes to represent characters

ELFRING FONTS UPC BAR CODES

Paramedic Program Pre-Admission Mathematics Test Study Guide

Having read this workbook you should be able to: recognise the arrangement of NAND gates used to form an S-R flip-flop.

Encoding Text with a Small Alphabet

ELEC EXPERIMENT 1 Basic Digital Logic Circuits

BINARY CODED DECIMAL: B.C.D.

Transcription:

Today s topics! Binary Numbers! Brookshear.-.! Slides from Prof. Marti Hearst of UC Berkeley SIMS! Upcoming! Networks Interactive Introduction to Graph Theory http://www.utm.edu/cgi-bin/caldwell/tutor/departments/math/graph/intro Kearns, Michael. "Economics, Computer Science, and Policy." Issues in Science and Technology, Winter 5.! Problem Solving Digital Computers! What are computers made up of?! Lowest level of abstraction: atoms! Higher level: transistors! Transistors! Invented in 95 at Bell Labs! An electronic switch! Building block for all modern electronics! Transistors are packaged as Integrated Circuits (ICs)! million transistors in IC Compsci. Compsci. Binary Digits (Bits)! Yes or No! On or Off! One or Zero! More on binary! Byte! A sequence of bits! 8 bits = byte! bytes = word (sometimes or 8 bytes)! Powers of two! How do binary numbers work? Compsci. Compsci.

Data Encoding! Text: Each character (letter, punctuation, etc.) is assigned a unique bit pattern.! ASCII: Uses patterns of 7-bits to represent most symbols used in written English text! Unicode: Uses patterns of -bits to represent the major symbols used in languages world side! ISO standard: Uses patterns of -bits to represent most symbols used in languages world wide! Numbers: Uses bits to represent a number in base two! Limitations of computer representations of numeric values! Overflow happens when a value is too big to be represented! Truncation happens when a value is between two representable values Images, Sound, & Compression! Images! Store as bit map: define each pixel RGB Luminance and chrominance! Vector techniques Scalable TrueType and PostScript! Audio! Sampling! Compression! Lossless: Huffman, LZW, GIF! Lossy: JPEG, MPEG, MP Compsci.5 Compsci. Decimal (Base ) Numbers Binary (Base ) Numbers! Each digit in a decimal number is chosen from ten symbols: {,,,,, 5,, 7, 8, 9 }! The position (right to left) of each digit represents a power of ten.! Example: Consider the decimal number 7 7!!!! position: 7 = " + " + " + 7"! Each digit in a binary number is chosen from two symbols: {, }! The position (right to left) of each digit represents a power of two.! Example: Convert binary number to decimal!!!! position: = " + " + " + " = "8 + " + " + " = 8 + + = Compsci.7 Compsci.8

Powers of Two Famous Powers of Two Decimal 8 8 Binary Power of 5 7 Compsci.9 Compsci. Other Number Systems Binary Addition Also: + + = with a carry of Compsci. Compsci.

Adding Binary Numbers + --------! + = ( " + " + " ) + ( " + " ) = ( " + " + " ) + ( " + " )! Add like terms: There is one, one, one = " + " + " = Adding Binary Numbers $ carry + ---------! + = ( " + " + " ) + (" + " + " ) = ( " + " + " ) + (" + " + " )! Add like terms: There are two s, two s, one = " + " + "! BinaryNumber Applet = "8 + " + " + " = Compsci. Compsci. Converting Decimal to Binary Converting Decimal to Binary Decimal 5 7 8 # # conversion # # = " = " = " + " = + = " + " = " + " + " 5 = + = " + " + " = + = " + " + " 7 = ++ = " + " + " 8 = " + " + " + " Binary! Repeated division by two until the quotient is zero! Example: Convert decimal number 5 to binary 7 Binary representation of 5 is 5 remainder Compsci.5 Compsci.

Converting Decimal to Binary Problems 7 5! Subtracting highest power of two! s in positions 5,,,! = plus thirty-two! 8s = plus sixteen! s = plus eights! s = 8s plus four! 7 s = s plus two! 5 = 7 s plus ones 5-5 = - = - = - = Compsci.7! Convert to decimal representation! Add the binary numbers and and express their sum in binary representation! Convert 77 to binary representation Compsci.8 Solutions! Convert to decimal representation Solutions! Convert 77 to binary representation = " + " 5 + " + " + " + " + " = " + " + " + "8 + " + " + " = + + 8 = 88! Add the binary numbers and and express their sum in binary representation + ------------- 9 9 8 77 Binary representation of 77 is Compsci.9 Compsci.

Boolean Logic! AND, OR, NOT, NOR, NAND, XOR! Each operator has a set of rules for combining two binary inputs! These rules are defined in a Truth Table! (This term is from the field of Logic)! Each implemented in an electronic device called a gate! Gates operate on inputs of s and s! These are more basic than operations like addition! Gates are used to build up circuits that Compute addition, subtraction, etc Store values to be used later Translate values from one format to another Truth Tables Compsci. Compsci. In-Class Questions. How many different bit patterns can be formed if each must consist of exactly bits?. Represent the bit pattern in hexadecimal notation.. Translate each of the following binary representations into its equivalent base ten representation..... Translate in decimal to binary Compsci.