Conversions between Decimal and Binary

Size: px
Start display at page:

Download "Conversions between Decimal and Binary"

Transcription

1 Conversions between Decimal and Binary Binary to Decimal Technique - use the definition of a number in a positional number system with base 2 - evaluate the definition formula ( the formula ) using decimal arithmetic Example position = corresponding power of = = 43 (decimal) d 5 d 4 d 3 d 2 d 1 d 0 generalize: Octal to Decimal, Hexadecimal to Decimal, any base to Decimal EECS 1520 Week 3.2 September 21, 2017 page 1

2 Decimal to Binary Technique - repeatedly divide by 2 - remainder is the next digit - binary number is developed right to left Example generalize: Decimal to Octal, Decimal to Hexadecimal, Decimal to any base EECS 1520 Week 3.2 September 21, 2017 page 2

3 What is going on in the repeated division by 2? Example (decimal) = produces a quotient of 21, with a remainder of = (decimal) = produces a quotient of 10, with a remainder of = EECS 1520 Week 3.2 September 21, 2017 page 3

4 10 (decimal) = produces a quotient of 5, with a remainder of = (decimal) = produces a quotient of 2, with a remainder of = (decimal) = produces a quotient of 1, with a remainder of = (decimal) = produces a quotient of 0, with a remainder of = EECS 1520 Week 3.2 September 21, 2017 page 4

5 Generalization: Conversions between Decimal and base b base b to Decimal Technique - use the definition of a number in a positional number system with base b - evaluate the definition formula ( the formula ) using decimal arithmetic Decimal to base b Technique - repeatedly divide by b - remainder is the next digit - base b number is developed right to left EECS 1520 Week 3.2 September 21, 2017 page 5

6 Conversions between Binary and Octal or Hexadecimal Binary to Octal Technique - group bits into threes, right to left - convert each such group to an octal digit Example = = 1327 (octal) Binary to Hexadecimal Technique - group bits into fours, right to left - convert each such group to a hexadecimal digit Example = = 2CB (hexadecimal) EECS 1520 Week 3.2 September 21, 2017 page 6

7 Octal to Binary Technique - convert each octal digit to a three-bit binary representation Example 705 = = (binary) Hexadecimal to Binary Technique - convert each octal digit to a four-bit binary representation Example 10AF = = (binary) EECS 1520 Week 3.2 September 21, 2017 page 7

8 You will need the following tables in the above conversion process: (These can easily be constructed in the margins of a test paper when needed, or digit by digit on the fly ) Binary Octal Binary Hexadecimal Octal Binary Hex Binary digit digit (10) A (11) B (12) C (13) D (14) E (15) F 1111 EECS 1520 Week 3.2 September 21, 2017 page 8

9 What about converting between Octal and Hexadecimal? Octal to Hexadecimal: Convert Octal to Binary and then convert Binary to Hexadecimal. Hexadecimal to Octal: Convert Hexadecimal to Binary, and then convert Binary to Octal. EECS 1520 Week 3.2 September 21, 2017 page 9

10 Representing Natural Numbers with a finite number of digits General property Number of digits Min Max nn 0 bb nn 1 Examples: b=10, n=3 000 to 999 b=2, n=3 000 to 111 (equivalent to 0 to 7, in decimal) b=8, n=3 000 to 777 (equivalent to 0 to 511, in decimal) b=16, n=3 000 to FFF (equivalent to 0 to, in decimal) EECS 1520 Week 3.2 September 21, 2017 page 10

11 Integers Basic definition an integer is a number which has no fractional part Examples: Representation of Integers previously: unsigned numbers only, i.e. the natural numbers need notation to represent both positive and negative numbers two schemes: 1) sign-magnitude, 2) complementary representation Sign-Magnitude in binary: sign: left-most bit (0 = positive, 1 = negative) magnitude: remaining bits Example: (using 6-bit sign-magnitude representation) +5 = = EECS 1520 Week 3.2 September 21, 2017 page 11

12 Ranges (for Binary numbers) Unsigned (Natural Numbers) Sign-Magnitude (Integers) Number of bits Min Max Min Max etc. nn 0 2 nn 1 (2 nn 1 1) +(2 nn 1 1) EECS 1520 Week 3.2 September 21, 2017 page 12

13 Difficulties with Sign-Magnitude two representations for zero +0 = = (6-bit binary example) arithmetic is awkward, especially subtraction Complementary Representation positive numbers are represented by their corresponding natural numbers negative numbers are represented by (very) large natural numbers subtraction reduces to addition (of the representative natural numbers) note: complementary representation requires a fixed size (number of digits) representatives of the natural numbers: xx bb nn xx EECS 1520 Week 3.2 September 21, 2017 page 13

14 Example: (of Ten s Complement) Let b = 10 and n = 2 Positive Negative Numbers Numbers 00 (+0) 01 (+1) 99 (-1) 02 (+2) 98 (-2) 03 (+3) 97 (-3) 49 (+49) 51 (-49) 50 (-50) EECS 1520 Week 3.2 September 21, 2017 page 14

15 Visualization EECS 1520 Week 3.2 September 21, 2017 page 15

16 Examples of Arithmetic in Ten s Complement Add: -35 plus +25 equals plus 25 equals 90 Add: +17 plus +25 equals plus 25 equals 42 Add: +20 plus -30 equals plus 70 equals 90 Add: -20 plus +30 equals plus 30 equals 10 (110) subtraction reduces to addition because A B = A + (-B) easy to convert (the representative) a positive number to its negative counterpart, and to convert (the representative) of a negative number to its positive counterpart 80 represents -20, = 20, which represents represents +20, = 80, which represents -20 EECS 1520 Week 3.2 September 21, 2017 page 16

MATH Dr. Halimah Alshehri Dr. Halimah Alshehri

MATH Dr. Halimah Alshehri Dr. Halimah Alshehri MATH 1101 haalshehri@ksu.edu.sa 1 Introduction To Number Systems First Section: Binary System Second Section: Octal Number System Third Section: Hexadecimal System 2 Binary System 3 Binary System The binary

More information

ECE380 Digital Logic. Positional representation

ECE380 Digital Logic. Positional representation ECE380 Digital Logic Number Representation and Arithmetic Circuits: Number Representation and Unsigned Addition Dr. D. J. Jackson Lecture 16-1 Positional representation First consider integers Begin with

More information

ENGIN 112 Intro to Electrical and Computer Engineering

ENGIN 112 Intro to Electrical and Computer Engineering ENGIN 112 Intro to Electrical and Computer Engineering Lecture 3 More Number Systems Overview Hexadecimal numbers Related to binary and octal numbers Conversion between hexadecimal, octal and binary Value

More information

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

Numbering Systems. Contents: Binary & Decimal. Converting From: B D, D B. Arithmetic operation on Binary. Numbering Systems Contents: Binary & Decimal. Converting From: B D, D B. Arithmetic operation on Binary. Addition & Subtraction using Octal & Hexadecimal 2 s Complement, Subtraction Using 2 s Complement.

More information

CSE 241 Digital Systems Spring 2013

CSE 241 Digital Systems Spring 2013 CSE 241 Digital Systems Spring 2013 Instructor: Prof. Kui Ren Department of Computer Science and Engineering Lecture slides modified from many online resources and used solely for the educational purpose.

More information

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

14:332:231 DIGITAL LOGIC DESIGN. Why Binary Number System? :33:3 DIGITAL LOGIC DESIGN Ivan Marsic, Rutgers University Electrical & Computer Engineering Fall 3 Lecture #: Binary Number System Complement Number Representation X Y Why Binary Number System? Because

More information

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

Menu. Review of Number Systems EEL3701 EEL3701. Math. Review of number systems >Binary math >Signed number systems Menu Review of number systems >Binary math >Signed number systems Look into my... 1 Our decimal (base 10 or radix 10) number system is positional. Ex: 9437 10 = 9x10 3 + 4x10 2 + 3x10 1 + 7x10 0 We have

More information

Four Important Number Systems

Four Important Number Systems Four Important Number Systems System Why? Remarks Decimal Base 10: (10 fingers) Most used system Binary Base 2: On/Off systems 3-4 times more digits than decimal Octal Base 8: Shorthand notation for working

More information

CISC 1400 Discrete Structures

CISC 1400 Discrete Structures CISC 1400 Discrete Structures Chapter 2 Sequences What is Sequence? A sequence is an ordered list of objects or elements. For example, 1, 2, 3, 4, 5, 6, 7, 8 Each object/element is called a term. 1 st

More information

Number Theory: Representations of Integers

Number Theory: Representations of Integers Instructions: In-class exercises are meant to introduce you to a new topic and provide some practice with the new topic. Work in a team of up to 4 people to complete this exercise. You can work simultaneously

More information

CHAPTER 2 NUMBER SYSTEMS

CHAPTER 2 NUMBER SYSTEMS CHAPTER 2 NUMBER SYSTEMS The Decimal Number System : We begin our study of the number systems with the familiar decimal number system. The decimal system contains ten unique symbol 0, 1, 2, 3, 4, 5, 6,

More information

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

EE260: Digital Design, Spring n Digital Computers. n Number Systems. n Representations. n Conversions. n Arithmetic Operations. EE 260: Introduction to Digital Design Number Systems Yao Zheng Department of Electrical Engineering University of Hawaiʻi at Mānoa Overview n Digital Computers n Number Systems n Representations n Conversions

More information

Number Bases. Ioan Despi. University of New England. August 4, 2013

Number Bases. Ioan Despi. University of New England. August 4, 2013 Number Bases Ioan Despi despi@turing.une.edu.au University of New England August 4, 2013 Outline Ioan Despi AMTH140 2 of 21 1 Frequently Used Number Systems 2 Conversion to Numbers of Different Bases 3

More information

Student Responsibilities Week 8. Mat Section 3.6 Integers and Algorithms. Algorithm to Find gcd()

Student Responsibilities Week 8. Mat Section 3.6 Integers and Algorithms. Algorithm to Find gcd() Student Responsibilities Week 8 Mat 2345 Week 8 Reading: Textbook, Section 3.7, 4.1, & 5.2 Assignments: Sections 3.6, 3.7, 4.1 Induction Proof Worksheets Attendance: Strongly Encouraged Fall 2013 Week

More information

0,..., r 1 = digits in radix r number system, that is 0 d i r 1 where m i n 1

0,..., r 1 = digits in radix r number system, that is 0 d i r 1 where m i n 1 RADIX r NUMBER SYSTEM Let (N) r be a radix r number in a positional weighting number system, then (N) r = d n 1 r n 1 + + d 0 r 0 d 1 r 1 + + d m r m where: r = radix d i = digit at position i, m i n 1

More information

NUMBERS AND CODES CHAPTER Numbers

NUMBERS AND CODES CHAPTER Numbers CHAPTER 2 NUMBERS AND CODES 2.1 Numbers When a number such as 101 is given, it is impossible to determine its numerical value. Some may say it is five. Others may say it is one hundred and one. Could it

More information

2.5 정수와알고리즘 (Integers and Algorithms)

2.5 정수와알고리즘 (Integers and Algorithms) 이산수학 () 2.5 정수와알고리즘 (Integers and Algorithms) 2006 년봄학기 문양세강원대학교컴퓨터과학과 Introduction Base-b representations of integers. (b진법표현 ) Especially: binary, hexadecimal, octal. Also, two s complement representation

More information

Base-b representations of integers. (b 진법표현 ) Algorithms for computer arithmetic: Euclidean algorithm for finding GCD s.

Base-b representations of integers. (b 진법표현 ) Algorithms for computer arithmetic: Euclidean algorithm for finding GCD s. 이산수학 () 정수와알고리즘 (Integers and Algorithms) 2011년봄학기 강원대학교컴퓨터과학전공문양세 Introduction Base-b representations of integers. (b 진법표현 ) Especially: binary, hexadecimal, octal. Also, two s complement representation

More information

ENGIN 112 Intro to Electrical and Computer Engineering

ENGIN 112 Intro to Electrical and Computer Engineering ENGIN 112 Intro to Electrical and Computer Engineering Lecture 2 Number Systems Russell Tessier KEB 309 G tessier@ecs.umass.edu Overview The design of computers It all starts with numbers Building circuits

More information

Mat Week 8. Week 8. gcd() Mat Bases. Integers & Computers. Linear Combos. Week 8. Induction Proofs. Fall 2013

Mat Week 8. Week 8. gcd() Mat Bases. Integers & Computers. Linear Combos. Week 8. Induction Proofs. Fall 2013 Fall 2013 Student Responsibilities Reading: Textbook, Section 3.7, 4.1, & 5.2 Assignments: Sections 3.6, 3.7, 4.1 Proof Worksheets Attendance: Strongly Encouraged Overview 3.6 Integers and Algorithms 3.7

More information

Hakim Weatherspoon CS 3410 Computer Science Cornell University

Hakim Weatherspoon CS 3410 Computer Science Cornell University Hakim Weatherspoon CS 3410 Computer Science Cornell University The slides are the product of many rounds of teaching CS 3410 by Professors Weatherspoon, Bala, Bracy, and Sirer. memory inst 32 register

More information

CSE 20: Discrete Mathematics

CSE 20: Discrete Mathematics Spring 2018 Summary So far: Today: Logic and proofs Divisibility, modular arithmetics Number Systems More logic definitions and proofs Reading: All of Chap. 1 + Chap 4.1, 4.2. Divisibility P = 5 divides

More information

Chapter 1 CSCI

Chapter 1 CSCI Chapter 1 CSCI-1510-003 What is a Number? An expression of a numerical quantity A mathematical quantity Many types: Natural Numbers Real Numbers Rational Numbers Irrational Numbers Complex Numbers Etc.

More information

12/31/2010. Digital Operations and Computations Course Notes. 01-Number Systems Text: Unit 1. Overview. What is a Digital System?

12/31/2010. Digital Operations and Computations Course Notes. 01-Number Systems Text: Unit 1. Overview. What is a Digital System? Digital Operations and Computations Course Notes 0-Number Systems Text: Unit Winter 20 Professor H. Louie Department of Electrical & Computer Engineering Seattle University ECEGR/ISSC 20 Digital Operations

More information

hexadecimal-to-decimal conversion

hexadecimal-to-decimal conversion OTHER NUMBER SYSTEMS: octal (digits 0 to 7) group three binary numbers together and represent as base 8 3564 10 = 110 111 101 100 2 = (6X8 3 ) + (7X8 2 ) + (5X8 1 ) + (4X8 0 ) = 6754 8 hexadecimal (digits

More information

Week No. 06: Numbering Systems

Week No. 06: Numbering Systems Week No. 06: Numbering Systems Numbering System: A numbering system defined as A set of values used to represent quantity. OR A number system is a term used for a set of different symbols or digits, which

More information

Number Representations

Number Representations Computer Arithmetic Algorithms Prof. Dae Hyun Kim School of Electrical Engineering and Computer Science Washington State University Number Representations Information Textbook Israel Koren, Computer Arithmetic

More information

Counting in Different Number Systems

Counting in Different Number Systems Counting in Different Number Systems Base 1 (Decimal) is important because that is the base that we first learn in our culture. Base 2 (Binary) is important because that is the base used for computer codes

More information

Numbers and Arithmetic

Numbers and Arithmetic Numbers and Arithmetic See: P&H Chapter 2.4 2.6, 3.2, C.5 C.6 Hakim Weatherspoon CS 3410, Spring 2013 Computer Science Cornell University Big Picture: Building a Processor memory inst register file alu

More information

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

Digital Systems Overview. Unit 1 Numbering Systems. Why Digital Systems? Levels of Design Abstraction. Dissecting Decimal Numbers Unit Numbering Systems Fundamentals of Logic Design EE2369 Prof. Eric MacDonald Fall Semester 2003 Digital Systems Overview Digital Systems are Home PC XBOX or Playstation2 Cell phone Network router Data

More information

Binary addition example worked out

Binary addition example worked out Binary addition example worked out Some terms are given here Exercise: what are these numbers equivalent to in decimal? The initial carry in is implicitly 0 1 1 1 0 (Carries) 1 0 1 1 (Augend) + 1 1 1 0

More information

CSE 20 DISCRETE MATH. Fall

CSE 20 DISCRETE MATH. Fall CSE 20 DISCRETE MATH There are 10 types of people in the world: those who understand binary and those who don't. Fall 2017 http://cseweb.ucsd.edu/classes/fa17/cse20-ab/ Today's learning goals Define the

More information

Design of Digital Circuits Reading: Binary Numbers. Required Reading for Week February 2017 Spring 2017

Design of Digital Circuits Reading: Binary Numbers. Required Reading for Week February 2017 Spring 2017 Design of Digital Circuits Reading: Binary Numbers Required Reading for Week 1 23-24 February 2017 Spring 2017 Binary Numbers Design of Digital Circuits 2016 Srdjan Capkun Frank K. Gürkaynak http://www.syssec.ethz.ch/education/digitaltechnik_16

More information

Chapter 2 (Part 3): The Fundamentals: Algorithms, the Integers & Matrices. Integers & Algorithms (2.5)

Chapter 2 (Part 3): The Fundamentals: Algorithms, the Integers & Matrices. Integers & Algorithms (2.5) CSE 54 Discrete Mathematics & Chapter 2 (Part 3): The Fundamentals: Algorithms, the Integers & Matrices Integers & Algorithms (Section 2.5) by Kenneth H. Rosen, Discrete Mathematics & its Applications,

More information

14:332:231 DIGITAL LOGIC DESIGN. 2 s-complement Representation

14:332:231 DIGITAL LOGIC DESIGN. 2 s-complement Representation 4:332:23 DIGITAL LOGIC DESIGN Ivan Marsic, Rutgers University Electrical & Computer Engineering Fall 203 Lecture #3: Addition, Subtraction, Multiplication, and Division 2 s-complement Representation RECALL

More information

Fundamentals of Digital Design

Fundamentals of Digital Design Fundamentals of Digital Design Digital Radiation Measurement and Spectroscopy NE/RHP 537 1 Binary Number System The binary numeral system, or base-2 number system, is a numeral system that represents numeric

More information

ECE260: Fundamentals of Computer Engineering

ECE260: Fundamentals of Computer Engineering Data Representation & 2 s Complement James Moscola Dept. of Engineering & Computer Science York College of Pennsylvania Based on Computer Organization and Design, 5th Edition by Patterson & Hennessy Data

More information

Discrete Mathematics GCD, LCM, RSA Algorithm

Discrete Mathematics GCD, LCM, RSA Algorithm Discrete Mathematics GCD, LCM, RSA Algorithm Abdul Hameed http://informationtechnology.pk/pucit abdul.hameed@pucit.edu.pk Lecture 16 Greatest Common Divisor 2 Greatest common divisor The greatest common

More information

Number System. Decimal to binary Binary to Decimal Binary to octal Binary to hexadecimal Hexadecimal to binary Octal to binary

Number System. Decimal to binary Binary to Decimal Binary to octal Binary to hexadecimal Hexadecimal to binary Octal to binary Number System Decimal to binary Binary to Decimal Binary to octal Binary to hexadecimal Hexadecimal to binary Octal to binary BOOLEAN ALGEBRA BOOLEAN LOGIC OPERATIONS Logical AND Logical OR Logical COMPLEMENTATION

More information

CSEN102 Introduction to Computer Science

CSEN102 Introduction to Computer Science CSEN102 Introduction to Computer Science Lecture 7: Representing Information I Prof. Dr. Slim Abdennadher Dr. Mohammed Salem, slim.abdennadher@guc.edu.eg, mohammed.salem@guc.edu.eg German University Cairo,

More information

ECE 372 Microcontroller Design

ECE 372 Microcontroller Design Data Formats Humor There are 10 types of people in the world: Those who get binary and those who don t. 1 Information vs. Data Information An abstract description of facts, processes or perceptions How

More information

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

Part I, Number Systems. CS131 Mathematics for Computer Scientists II Note 1 INTEGERS CS131 Part I, Number Systems CS131 Mathematics for Computer Scientists II Note 1 INTEGERS The set of all integers will be denoted by Z. So Z = {..., 2, 1, 0, 1, 2,...}. The decimal number system uses the

More information

Introduction CSE 541

Introduction CSE 541 Introduction CSE 541 1 Numerical methods Solving scientific/engineering problems using computers. Root finding, Chapter 3 Polynomial Interpolation, Chapter 4 Differentiation, Chapter 4 Integration, Chapters

More information

Complement Arithmetic

Complement Arithmetic Complement Arithmetic Objectives In this lesson, you will learn: How additions and subtractions are performed using the complement representation, What is the Overflow condition, and How to perform arithmetic

More information

Lecture 2 Review on Digital Logic (Part 1)

Lecture 2 Review on Digital Logic (Part 1) Lecture 2 Review on Digital Logic (Part 1) Xuan Silvia Zhang Washington University in St. Louis http://classes.engineering.wustl.edu/ese461/ Grading Engagement 5% Review Quiz 10% Homework 10% Labs 40%

More information

Numbers. Dr Hammadi Nait-Charif. Senior Lecturer Bournemouth University United Kingdom

Numbers. Dr Hammadi Nait-Charif. Senior Lecturer Bournemouth University United Kingdom Numbers Dr Hammadi Nait-Charif Senior Lecturer Bournemouth University United Kingdom hncharif@bournemouth.ac.uk http://nccastaff.bmth.ac.uk/hncharif/mathscgs/maths.html Dr Hammadi Nait-Charif (BU, UK)

More information

Numbers and Arithmetic

Numbers and Arithmetic Numbers and Arithmetic See: P&H Chapter 2.4 2.6, 3.2, C.5 C.6 Hakim Weatherspoon CS 3410, Spring 2013 Computer Science Cornell University Big Picture: Building a Processor memory inst register file alu

More information

convert a two s complement number back into a recognizable magnitude.

convert a two s complement number back into a recognizable magnitude. 1 INTRODUCTION The previous lesson introduced binary and hexadecimal numbers. In this lesson we look at simple arithmetic operations using these number systems. In particular, we examine the problem of

More information

cse 311: foundations of computing Fall 2015 Lecture 12: Primes, GCD, applications

cse 311: foundations of computing Fall 2015 Lecture 12: Primes, GCD, applications cse 311: foundations of computing Fall 2015 Lecture 12: Primes, GCD, applications n-bit unsigned integer representation Represent integer x as sum of powers of 2: If x = n 1 i=0 b i 2 i where each b i

More information

CSCI 255. S i g n e d N u m s / S h i f t i n g / A r i t h m e t i c O p s.

CSCI 255. S i g n e d N u m s / S h i f t i n g / A r i t h m e t i c O p s. Ying.Yang 1.-1 CSCI 255 http://cs.furman.edu In mathematics, negative integers exists -> forced to do it binary In a binary string, the MSB is sacrificed as the signed bit 0 => Positive Value 1 => Negative

More information

0 / 1 Now, Binary value of the given number :-

0 / 1 Now, Binary value of the given number :- Course Code : MCS-012 Course Title : Computer Organisation and Assembly Language Programming Assignment Number : MCA(1)/012/Assign/2014-15 Maximum Marks : 100 Weightage : 25% Last Dates for Submission

More information

1 Computing System 2. 2 Data Representation Number Systems 22

1 Computing System 2. 2 Data Representation Number Systems 22 Chapter 4: Computing System & Data Representation Christian Jacob 1 Computing System 2 1.1 Abacus 3 2 Data Representation 19 3 Number Systems 22 3.1 Important Number Systems for Computers 24 3.2 Decimal

More information

We say that the base of the decimal number system is ten, represented by the symbol

We say that the base of the decimal number system is ten, represented by the symbol Introduction to counting and positional notation. In the decimal number system, a typical number, N, looks like... d 3 d 2 d 1 d 0.d -1 d -2 d -3... [N1] where the ellipsis at each end indicates that there

More information

CPE100: Digital Logic Design I

CPE100: Digital Logic Design I Chapter 1 Professor Brendan Morris, SEB 3216, brendan.morris@unlv.edu http://www.ee.unlv.edu/~b1morris/cpe100/ CPE100: Digital Logic Design I Section 1004: Dr. Morris From Zero to One Chapter 1 Background:

More information

Resource: color-coded sets of standards cards (one page for each set)

Resource: color-coded sets of standards cards (one page for each set) Resource: color-coded sets of standards cards (one page for each set) Fluency With Operations: on blue cardstock Expressions and Equations: on yellow cardstock Real-World Applications: on green cardstock

More information

3 The fundamentals: Algorithms, the integers, and matrices

3 The fundamentals: Algorithms, the integers, and matrices 3 The fundamentals: Algorithms, the integers, and matrices 3.4 The integers and division This section introduces the basics of number theory number theory is the part of mathematics involving integers

More information

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

CSE 20 Discrete Math. Algebraic Rules for Propositional Formulas. Summer, July 11 (Day 2) Number Systems/Computer Arithmetic Predicate Logic CSE 20 Discrete Math Algebraic Rules for Propositional Formulas Equivalences between propositional formulas (similar to algebraic equivalences): Associative Summer, 2006 July 11 (Day 2) Number Systems/Computer

More information

CS1800 Discrete Structures Fall 2017 October, CS1800 Discrete Structures Midterm Version A

CS1800 Discrete Structures Fall 2017 October, CS1800 Discrete Structures Midterm Version A CS1800 Discrete Structures Fall 2017 October, 2017 CS1800 Discrete Structures Midterm Version A Instructions: 1. The exam is closed book and closed notes. You may not use a calculator or any other electronic

More information

COT 3100 Applications of Discrete Structures Dr. Michael P. Frank

COT 3100 Applications of Discrete Structures Dr. Michael P. Frank University of Florida Dept. of Computer & Information Science & Engineering COT 3100 Applications of Discrete Structures Dr. Michael P. Frank Slides for a Course Based on the Text Discrete Mathematics

More information

Computer Number Systems

Computer Number Systems Computer Number Systems All computers are electronic devices and can ultimately do one thing: detect whether an electrical signal is on or off. Therefore, the earliest computer scientists realized that

More information

CHAPTER 7. Exercises 17/ / /2 2 0

CHAPTER 7. Exercises 17/ / /2 2 0 CHAPTER 7 Exercises E7. (a) For the whole part, we have: Quotient Remainders 23/2 /2 5 5/2 2 2/2 0 /2 0 Reading the remainders in reverse order, we obtain: 23 0 = 0 2 For the fractional part we have 2

More information

ALU (3) - Division Algorithms

ALU (3) - Division Algorithms HUMBOLDT-UNIVERSITÄT ZU BERLIN INSTITUT FÜR INFORMATIK Lecture 12 ALU (3) - Division Algorithms Sommersemester 2002 Leitung: Prof. Dr. Miroslaw Malek www.informatik.hu-berlin.de/rok/ca CA - XII - ALU(3)

More information

Standard forms for writing numbers

Standard forms for writing numbers Standard forms for writing numbers In order to relate the abstract mathematical descriptions of familiar number systems to the everyday descriptions of numbers by decimal expansions and similar means,

More information

EDULABZ INTERNATIONAL NUMBER SYSTEM

EDULABZ INTERNATIONAL NUMBER SYSTEM NUMBER SYSTEM 1. Find the product of the place value of 8 and the face value of 7 in the number 7801. Ans. Place value of 8 in 7801 = 800, Face value of 7 in 7801 = 7 Required product = 800 7 = 00. How

More information

Computer Arithmetic. MATH 375 Numerical Analysis. J. Robert Buchanan. Fall Department of Mathematics. J. Robert Buchanan Computer Arithmetic

Computer Arithmetic. MATH 375 Numerical Analysis. J. Robert Buchanan. Fall Department of Mathematics. J. Robert Buchanan Computer Arithmetic Computer Arithmetic MATH 375 Numerical Analysis J. Robert Buchanan Department of Mathematics Fall 2013 Machine Numbers When performing arithmetic on a computer (laptop, desktop, mainframe, cell phone,

More information

4 Number Theory and Cryptography

4 Number Theory and Cryptography 4 Number Theory and Cryptography 4.1 Divisibility and Modular Arithmetic This section introduces the basics of number theory number theory is the part of mathematics involving integers and their properties.

More information

Cs302 Quiz for MID TERM Exam Solved

Cs302 Quiz for MID TERM Exam Solved Question # 1 of 10 ( Start time: 01:30:33 PM ) Total Marks: 1 Caveman used a number system that has distinct shapes: 4 5 6 7 Question # 2 of 10 ( Start time: 01:31:25 PM ) Total Marks: 1 TTL based devices

More information

Combinational Logic. By : Ali Mustafa

Combinational Logic. By : Ali Mustafa Combinational Logic By : Ali Mustafa Contents Adder Subtractor Multiplier Comparator Decoder Encoder Multiplexer How to Analyze any combinational circuit like this? Analysis Procedure To obtain the output

More information

Computer Architecture 10. Residue Number Systems

Computer Architecture 10. Residue Number Systems Computer Architecture 10 Residue Number Systems Ma d e wi t h Op e n Of f i c e. o r g 1 A Puzzle What number has the reminders 2, 3 and 2 when divided by the numbers 7, 5 and 3? x mod 7 = 2 x mod 5 =

More information

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

Why digital? Overview. Number Systems. Binary to Decimal conversion Why digital? Overview It has the following advantages over analog. It can be processed and transmitted efficiently and reliably. It can be stored and retrieved with greater accuracy. Noise level does not

More information

Midterm Examination # 1 Wednesday, February 25, Duration of examination: 75 minutes

Midterm Examination # 1 Wednesday, February 25, Duration of examination: 75 minutes Page 1 of 10 School of Computer Science 60-265-01 Computer Architecture and Digital Design Winter 2009 Semester Midterm Examination # 1 Wednesday, February 25, 2009 Student Name: First Name Family Name

More information

Chapter 9 - Number Systems

Chapter 9 - Number Systems Chapter 9 - Number Systems Luis Tarrataca luis.tarrataca@gmail.com CEFET-RJ L. Tarrataca Chapter 9 - Number Systems 1 / 50 1 Motivation 2 Positional Number Systems 3 Binary System L. Tarrataca Chapter

More information

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

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN. Week 2 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Week 2 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering Boolean Algebra Boolean Algebra A Boolean algebra is defined with: A set of

More information

Informatics 1 - Computation & Logic: Tutorial 3

Informatics 1 - Computation & Logic: Tutorial 3 Informatics 1 - Computation & Logic: Tutorial 3 Counting Week 5: 16-20 October 2016 Please attempt the entire worksheet in advance of the tutorial, and bring all work with you. Tutorials cannot function

More information

K K.OA.2 1.OA.2 2.OA.1 3.OA.3 4.OA.3 5.NF.2 6.NS.1 7.NS.3 8.EE.8c

K K.OA.2 1.OA.2 2.OA.1 3.OA.3 4.OA.3 5.NF.2 6.NS.1 7.NS.3 8.EE.8c K.OA.2 1.OA.2 2.OA.1 3.OA.3 4.OA.3 5.NF.2 6.NS.1 7.NS.3 8.EE.8c Solve addition and subtraction word problems, and add and subtract within 10, e.g., by using objects or drawings to Solve word problems that

More information

Chapter 5. Number Theory. 5.1 Base b representations

Chapter 5. Number Theory. 5.1 Base b representations Chapter 5 Number Theory The material in this chapter offers a small glimpse of why a lot of facts that you ve probably nown and used for a long time are true. It also offers some exposure to generalization,

More information

Playing with Numbers. introduction. numbers in general FOrM. remarks (i) The number ab does not mean a b. (ii) The number abc does not mean a b c.

Playing with Numbers. introduction. numbers in general FOrM. remarks (i) The number ab does not mean a b. (ii) The number abc does not mean a b c. 5 Playing with Numbers introduction In earlier classes, you have learnt about natural numbers, whole numbers, integers and their properties. In this chapter, we shall understand 2-digit and 3-digit numbers

More information

Numbers & Arithmetic. Hakim Weatherspoon CS 3410, Spring 2012 Computer Science Cornell University. See: P&H Chapter , 3.2, C.5 C.

Numbers & Arithmetic. Hakim Weatherspoon CS 3410, Spring 2012 Computer Science Cornell University. See: P&H Chapter , 3.2, C.5 C. Numbers & Arithmetic Hakim Weatherspoon CS 3410, Spring 2012 Computer Science Cornell University See: P&H Chapter 2.4-2.6, 3.2, C.5 C.6 Example: Big Picture Computer System Organization and Programming

More information

Numbers. 2.1 Integers. P(n) = n(n 4 5n 2 + 4) = n(n 2 1)(n 2 4) = (n 2)(n 1)n(n + 1)(n + 2); 120 =

Numbers. 2.1 Integers. P(n) = n(n 4 5n 2 + 4) = n(n 2 1)(n 2 4) = (n 2)(n 1)n(n + 1)(n + 2); 120 = 2 Numbers 2.1 Integers You remember the definition of a prime number. On p. 7, we defined a prime number and formulated the Fundamental Theorem of Arithmetic. Numerous beautiful results can be presented

More information

ENG2410 Digital Design Introduction to Digital Systems. Fall 2017 S. Areibi School of Engineering University of Guelph

ENG2410 Digital Design Introduction to Digital Systems. Fall 2017 S. Areibi School of Engineering University of Guelph ENG2410 Digital Design Introduction to Digital Systems Fall 2017 S. Areibi School of Engineering University of Guelph Resources Chapter #1, Mano Sections 1.1 Digital Computers 1.2 Number Systems 1.3 Arithmetic

More information

REVIEW Chapter 1 The Real Number System

REVIEW Chapter 1 The Real Number System REVIEW Chapter The Real Number System In class work: Complete all statements. Solve all exercises. (Section.4) A set is a collection of objects (elements). The Set of Natural Numbers N N = {,,, 4, 5, }

More information

Binary Arithmetic: counting with ones

Binary Arithmetic: counting with ones Binary Arithmetic: counting with ones Robin McLean 28 February 2015 Weighing in ounces Suppose we have one of each of the following weights: 32oz, 16oz, 8oz, 4oz, 2oz and 1oz. Can we weigh any whole number

More information

Math 230 Assembly Language Programming (Computer Organization) Numeric Data Lecture 2

Math 230 Assembly Language Programming (Computer Organization) Numeric Data Lecture 2 Math 230 Assembly Language Programming (Computer Organization) Numeric Data Lecture 2 1 Decimal Numbers Recall base 10 3582 = 3000 + 500 + 80 + 2 = 3 10 3 + 5 10 2 + 8 10 1 + 2 10 0 2 Positional Notation

More information

Part 5: Digital Circuits

Part 5: Digital Circuits Characteristics of any number system are: Part 5: Digital Circuits 5.: Number Systems & Code Conversions. ase or radix is equal to the number of possible symbols in the system 2. The largest value of digit

More information

Computer Architecture, IFE CS and T&CS, 4 th sem. Representation of Integer Numbers in Computer Systems

Computer Architecture, IFE CS and T&CS, 4 th sem. Representation of Integer Numbers in Computer Systems Representation of Integer Numbers in Computer Systems Positional Numbering System Additive Systems history but... Roman numerals Positional Systems: r system base (radix) A number value a - digit i digit

More information

Chapter 1. Binary Systems 1-1. Outline. ! Introductions. ! Number Base Conversions. ! Binary Arithmetic. ! Binary Codes. ! Binary Elements 1-2

Chapter 1. Binary Systems 1-1. Outline. ! Introductions. ! Number Base Conversions. ! Binary Arithmetic. ! Binary Codes. ! Binary Elements 1-2 Chapter 1 Binary Systems 1-1 Outline! Introductions! Number Base Conversions! Binary Arithmetic! Binary Codes! Binary Elements 1-2 3C Integration 傳輸與介面 IA Connecting 聲音與影像 Consumer Screen Phone Set Top

More information

L1 2.1 Long Division of Polynomials and The Remainder Theorem Lesson MHF4U Jensen

L1 2.1 Long Division of Polynomials and The Remainder Theorem Lesson MHF4U Jensen L1 2.1 Long Division of Polynomials and The Remainder Theorem Lesson MHF4U Jensen In this section you will apply the method of long division to divide a polynomial by a binomial. You will also learn to

More information

Number System conversions

Number System conversions Number System conversions Number Systems The system used to count discrete units is called number system. There are four systems of arithmetic which are often used in digital electronics. Decimal Number

More information

Quantitative Aptitude

Quantitative Aptitude WWW.UPSCMANTRA.COM Quantitative Aptitude Concept 1 1. Number System 2. HCF and LCM 2011 Prelims Paper II NUMBER SYSTEM 2 NUMBER SYSTEM In Hindu Arabic System, we use ten symbols 0, 1, 2, 3, 4, 5, 6, 7,

More information

Next, we include the several conversion from type to type.

Next, we include the several conversion from type to type. Number Conversions: Binary Decimal; Floating Points In order to communicate with a computer, we need, at some point, to speak the same language. The words of our language are made up of combinations of

More information

Finite Fields. SOLUTIONS Network Coding - Prof. Frank H.P. Fitzek

Finite Fields. SOLUTIONS Network Coding - Prof. Frank H.P. Fitzek Finite Fields In practice most finite field applications e.g. cryptography and error correcting codes utilizes a specific type of finite fields, namely the binary extension fields. The following exercises

More information

CSE 20 DISCRETE MATH. Winter

CSE 20 DISCRETE MATH. Winter CSE 20 DISCRETE MATH There are 10 types of people in the world: those who understand binary and those who don't. Winter 2017 http://cseweb.ucsd.edu/classes/wi17/cse20-ab/ Today's learning goals Define

More information

Graduate Institute of Electronics Engineering, NTU Basic Division Scheme

Graduate Institute of Electronics Engineering, NTU Basic Division Scheme Basic Division Scheme 台灣大學電子所吳安宇博士 2002 ACCESS IC LAB Outline Shift/subtract division algorithm. Programmed division. Restoring hardware dividers. Nonstoring and signed division. Radix-2 SRT divisioin.

More information

UNIVERSITI TENAGA NASIONAL. College of Information Technology

UNIVERSITI TENAGA NASIONAL. College of Information Technology UNIVERSITI TENAGA NASIONAL College of Information Technology BACHELOR OF COMPUTER SCIENCE (HONS.) FINAL EXAMINATION SEMESTER 2 2012/2013 DIGITAL SYSTEMS DESIGN (CSNB163) January 2013 Time allowed: 3 hours

More information

L1 2.1 Long Division of Polynomials and The Remainder Theorem Lesson MHF4U Jensen

L1 2.1 Long Division of Polynomials and The Remainder Theorem Lesson MHF4U Jensen L1 2.1 Long Division of Polynomials and The Remainder Theorem Lesson MHF4U Jensen In this section you will apply the method of long division to divide a polynomial by a binomial. You will also learn to

More information

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

UNSIGNED BINARY NUMBERS DIGITAL ELECTRONICS SYSTEM DESIGN WHAT ABOUT NEGATIVE NUMBERS? BINARY ADDITION 11/9/2018 DIGITAL ELECTRONICS SYSTEM DESIGN LL 2018 PROFS. IRIS BAHAR & ROD BERESFORD NOVEMBER 9, 2018 LECTURE 19: BINARY ADDITION, UNSIGNED BINARY NUMBERS For the binary number b n-1 b n-2 b 1 b 0. b -1 b -2 b

More information

N= {1,2,3,4,5,6,7,8,9,10,11,...}

N= {1,2,3,4,5,6,7,8,9,10,11,...} 1.1: Integers and Order of Operations 1. Define the integers 2. Graph integers on a number line. 3. Using inequality symbols < and > 4. Find the absolute value of an integer 5. Perform operations with

More information

of Digital Electronics

of Digital Electronics 26 Digital Electronics 729 Digital Electronics 26.1 Analog and Digital Signals 26.3 Binary Number System 26.5 Decimal to Binary Conversion 26.7 Octal Number System 26.9 Binary-Coded Decimal Code (BCD Code)

More information

4. Number Theory (Part 2)

4. Number Theory (Part 2) 4. Number Theory (Part 2) Terence Sim Mathematics is the queen of the sciences and number theory is the queen of mathematics. Reading Sections 4.8, 5.2 5.4 of Epp. Carl Friedrich Gauss, 1777 1855 4.3.

More information

Ch 7 Summary - POLYNOMIAL FUNCTIONS

Ch 7 Summary - POLYNOMIAL FUNCTIONS Ch 7 Summary - POLYNOMIAL FUNCTIONS 1. An open-top box is to be made by cutting congruent squares of side length x from the corners of a 8.5- by 11-inch sheet of cardboard and bending up the sides. a)

More information