Lecturer: Santokh Singh

Slides:



Advertisements
Similar presentations
ECE 331 – Digital System Design
Advertisements

NUMBER SYSTEM. How to convert hexadecimal numbers to decimal numbers? 230 Working from right to left, MULTIPLY each position with 8 raised to the power.
DATA REPRESENTATION CONVERSION.
CS 151 Digital Systems Design Lecture 3 More Number Systems.
Chapter Chapter Goals Know the different types of numbers Describe positional notation.
ECE 301 – Digital Electronics Course Introduction, Number Systems, Conversion between Bases, and Basic Binary Arithmetic (Lecture #1)
ECE 331 – Digital System Design
Chapter 02 Binary Values and Number Systems Nell Dale & John Lewis.
ENGIN112 L3: More Number Systems September 8, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 3 More Number Systems.
Computer Systems 1 Fundamentals of Computing
CS105 INTRODUCTION TO COMPUTER CONCEPTS BINARY VALUES & NUMBER SYSTEMS Instructor: Cuong (Charlie) Pham.
Numbering Systems. CSCE 1062 Outline What is a Numbering System Review of decimal numbering system Binary representation range Hexadecimal numbering system.
Supplemental Chapter Number Bases
Number Systems What is the Standard Base we
1-1 Lecture 1 Class Overview and Appendix A -- Number Systems.
Chapter 2 Binary Values and Number Systems. 2 2 Natural Numbers Zero and any number obtained by repeatedly adding one to it. Examples: 100, 0, 45645,
CIS 234: Numbering Systems Dr. Ralph D. Westfall April, 2010.
Number systems, Operations, and Codes
Introduction to Computing Dr. Nadeem A Khan. Lecture 10.
Number System. Number Systems Important Number systems – Decimal – Binary – Hexadecimal.
Binary Values and Number Systems
CPS120: Introduction to Computer Science Computer Math: Converting to Decimal.
Number Base Conversions
Lecture 2 Binary Values and Number Systems. The number 943 is an example of a number written in positional notation. The relative positions of the digits.
Converting From decimal to Binary & Hexadecimal to Binary
Number Systems Binary to Decimal Octal to Decimal Hexadecimal to Decimal Binary to Octal Binary to Hexadecimal Two’s Complement.
Hexadecimal. Overview Hexadecimal (hex) ~ base 16 number system Use 0 through 9 and... A = 10 B = 11 C = 12 D = 13 E = 14 F = 15.
CSC 107 – Programming For Science. Positional Notation  Used in nearly all modern numerical systems  Right-to-left ordering of digits within larger.
Data Representation Hexadecimal  Although computers work in binary it is sometimes inconvenient for humans to read everything in Binary. For example in.
Data Representation Bits, Bytes, Binary, Hexadecimal.
Binary01.ppt Decimal Decimal: Base 10 means 10 Unique numerical digits ,00010,000 Weight Positions 3,
PHY 107 – Programming For Science. Positional Notation  Used in nearly all modern numerical systems  Right-to-left ordering of digits within larger.
Irvine, Kip R. Assembly Language for Intel-Based Computers 6/e, Signed Integers The highest bit indicates the sign. 1 = negative, 0 = positive.
1 4. Computer Maths and Logic 4.1 Number Systems.
Module 2.  In Module 1, we have learned basic number representation which include binary, octal, hexadecimal and decimal.  In digital systems, numbers.
Chapter 2 Binary Values and Number Systems Chapter Goals Distinguish among categories of numbers Describe positional notation Convert numbers in.
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI CSCI 230 Information Representation: Positive Integers Dale Roberts,
Number Systems. Topics  The Decimal Number System  The Binary Number System  Converting from Binary to Decimal  Converting from Decimal to Binary.
ECE 2110: Introduction to Digital Systems Number Systems: conversions.
CSC 110 – Intro to Computing Lecture 3: Converting between bases & Arithmetic in other bases.
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.
CMSC 1041 Binary / Hex Binary and Hex The number systems of Computer Science.
Chapter 01 Numbers. Chapter 02 Base 10 example Decimal Number Place Place (place - 1) ===============================
Chapter 5 NUMBER REPRESENTATION AND ARITHMETIC CIRCUITS.
ECE 2110: Introduction to Digital Systems Number Systems: conversions.
Binary Values. Numbers Natural Numbers Zero and any number obtained by repeatedly adding one to it. Examples: 100, 0, 45645, 32 Negative Numbers.
Prepared By: Norakmar Binti Mohd Nadzari CHAPTER 2 ARITHMETIC AND LOGIC UNIT.
Introduction To Number Systems
COMPUTER ORGANIZATION
Positional Notation A positional or place-value notation is a numeral system in which each position is related to the next by a constant multiplier, called.
EPSII 59:006 Spring 2004.
University of Gujrat Department of Computer Science
Binary, Octal and Hex Numbers Copyright Thaddeus Konar
Data Storage Introduction to computer, 2nd semester, 2010/2011
Binary Quiz UIN: ____________________
Principles of Computing – UFCFA Lecture-3
Binary, Octal and Hex Numbers Copyright Thaddeus Konar
EGRE 254 Number Systems and Codes 1/12/09
Hexadecimal Conversions
Digital Electronics and Microprocessors
Digital Logic Design (CSNB163)
ECE 301 – Digital Electronics
Binary Addition (1 of 2) Two 1-bit values A B A + B 1
Numeral systems (radix)
Computer Science 1 Review and finish Number base conversion
Information Representation
COE 202: Digital Logic Design Number Systems Part 2
Lecture 37 – Practice Exercises 9
Lecture 37 – Practice Exercises 9
Presentation transcript:

Lecturer: Santokh Singh CompSci 105 SS 2005 Principles of Computer Science Lecture 2 Lecturer: Santokh Singh

Numbers in the Computer Binary representation of integers Octal representation of integers Hexadecimal representation of integers Binary Arithmetic Addition Subtraction Using Bits as Bits Logical Operations

Positive Integers In the range 0-3 …. 11 00 01 10

Decimal Numbers 2 1 7 3

Decimal Numbers 1000 100 10 1 2 1 7 3

Decimal Numbers 103 102 101 100 2 1 7 3

Binary Numbers 1 1 1

Binary Numbers 23 22 21 20 1 1 1

Binary Numbers 8 4 2 1 1 1 1

Exercise Convert the binary number 11010 to decimal

Converting to Binary 1011 11 ? 1011 11

Digit Manipulation Removing the last digit of a number Extracting the last digit of a number 2173 217 ? 2173 3 ?

Extract in Right to Left Order 2173

Converting to Binary Repeat until number is empty Extract last binary digit Remove last binary digit

Exercise Convert the decimal number 77 to binary

Numbers in the Computer Binary representation of integers Octal representation of integers Hexadecimal representation of integers Binary Arithmetic Addition Subtraction Using Bits as Bits Logical Operations

1 5 + 6 1 2 + 3 8 7 + 15 1 + 2 6 4 + 10 2 3 + 5 9 + 18 3 7 + 10 1 +

1 1 + + 1 + + 1 1 1 10

1 1 1 + 1 1 1

1 1 1 - 1 1

Exercises Perform the following binary calculations. Convert to base 10 to check your answer: 101110 +111111 101110 - 11111

If binary is so much easier, why do we use base 10 for most things?

If binary is so much easier, why do we use base 10 for most things? 275 100010011

Numbers in the Computer Binary representation of integers Octal representation of integers Hexadecimal representation of integers Binary Arithmetic Addition Subtraction Using Bits as Bits Logical Operations

Octal 1 2 3 000 001 010 011 4 5 6 7 100 101 110 111

1 0 1 0 1

1 7 3

Hexadecimal 0001 1 0010 2 0000 0011 3 0101 5 0110 6 0100 4 0111 7 1001 9 1010 A 1000 8 1011 B 1101 D 1110 E 1100 C 1111 F

Hex Numbers and Bytes 1000 1011 0010 0011

Course Book Notes for 1st and 2nd lecture:- Pages 62 - 64: Numbers in the Computer Pages 65 - 92: Data Representations