1/15/2015 Slide # 1 Binary, Octal and Hex Numbers Copyright Thaddeus Konar Introduction to Binary, Octal and Hexadecimal Numbers Thaddeus Konar.

Slides:



Advertisements
Similar presentations
Date of Birth Design Problem
Advertisements

You have been given a mission and a code. Use the code to complete the mission and you will save the world from obliteration…
Looking Inside the Black Box
Advanced Piloting Cruise Plot.
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
Principles & Applications
Chapter 1 The Study of Body Function Image PowerPoint
1 Copyright © 2010, Elsevier Inc. All rights Reserved Fig 2.1 Chapter 2.
Fast Algorithms for Finding Nearest Common Ancestors Dov Harel and Robert Endre Tarjan Fast Algorithms for Finding Nearest Common Ancestors SIAM J. COMPUT.
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Title Subtitle.
My Alphabet Book abcdefghijklm nopqrstuvwxyz.
0 - 0.
DIVIDING INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
MULT. INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
FACTORING ax2 + bx + c Think “unfoil” Work down, Show all steps.
Addition Facts
Year 6 mental test 5 second questions
Year 6 mental test 10 second questions
Binary Numbers.
Binary Numbers.
8 October 2013Birkbeck College, U. London1 Introduction to Computer Systems Lecturer: Steve Maybank Department of Computer Science and Information Systems.
15 October 2013Birkbeck College, U. London1 Introduction to Computer Systems Lecturer: Steve Maybank Department of Computer Science and Information Systems.
1 Floating Point Representation and Arithmetic (see Patterson Chapter 4)
A Simple ALU Binary Logic.
B261 Systems Architecture
Around the World AdditionSubtraction MultiplicationDivision AdditionSubtraction MultiplicationDivision.
The other way to represent Integers.
Number Systems. Common Number Systems SystemBaseSymbols Used by humans? Used in computers? Decimal100, 1, … 9YesNo Binary20, 1NoYes Octal80, 1, … 7No.
Monika Gope Lecturer IICT, KUET
ABC Technology Project
Truth Tables & Logic Expressions
Discrete Mathematical Structures: Theory and Applications
Digital Systems Introduction Binary Quantities and Variables
Digital Logical Structures
Logic Gates. Transistors as Switches ¡V BB voltage controls whether the transistor conducts in a common base configuration. ¡Logic circuits can be built.
VOORBLAD.
Binary Values and Number Systems
Number Systems  binary, octal, and hexadecimal numbers  why used  conversions, including to/from decimal  negative binary numbers  floating point.
1..
© 2012 National Heart Foundation of Australia. Slide 2.
Lets play bingo!!. Calculate: MEAN Calculate: MEDIAN
Understanding Generalist Practice, 5e, Kirst-Ashman/Hull
Chapter 5 Test Review Sections 5-1 through 5-4.
GG Consulting, LLC I-SUITE. Source: TEA SHARS Frequently asked questions 2.
Binary Lesson 4 Hexadecimal and Binary Practice. Counting to 15 Base Base Base 16 Base Base Base 16 Two Ten (Hex) Two Ten (Hex)
Binary Lesson 3 Hexadecimal. Counting to 15 Base Base Base 16 Base Base Base 16 Two Ten (Hex) Two Ten (Hex)
Binary Lesson 3 Hexadecimal. Counting to 15 Base Base Base 16 Base Base Base 16 Two Ten (Hex) Two Ten (Hex)
Addition 1’s to 20.
25 seconds left…...
Digital Logic & Design Lecture No. 3. Number System Conversion Conversion between binary and octal can be carried out by inspection.  Each octal digit.
Equal or Not. Equal or Not
Week 1.

Datorteknik IntegerAddSub bild 1 Integer arithmetic Depends what you mean by "integer" Assume at 3-bit string. –Then we define zero = 000 one = 001 Use.
We will resume in: 25 Minutes.
©Brooks/Cole, 2001 Chapter 12 Derived Types-- Enumerated, Structure and Union.
A SMALL TRUTH TO MAKE LIFE 100%
PSSA Preparation.
14-1 Bard, Gerstlauer, Valvano, Yerraballi EE 319K Introduction to Embedded Systems Lecture 14: Gaming Engines, Coding Style, Floating Point.
and M-ary Quadrature Amplitude Modulation (M-QAM)
Number Systems Decimal Binary Denary Octal Hexadecimal Click the mouse or Press the space bar to Continue.
Binary, Octal and Hex Numbers Copyright Thaddeus Konar
Binary, Octal and Hex Numbers Copyright Thaddeus Konar
Binary, Octal and Hex Numbers Copyright Thaddeus Konar
Binary, Octal and Hex Numbers Copyright Thaddeus Konar
Binary, Octal and Hex Numbers Copyright Thaddeus Konar
Presentation transcript:

1/15/2015 Slide # 1 Binary, Octal and Hex Numbers Copyright Thaddeus Konar Introduction to Binary, Octal and Hexadecimal Numbers Thaddeus Konar

1/15/2015 Slide # 2 Binary, Octal and Hex Numbers Copyright Thaddeus Konar Decimal Integers There is nothing ‘unique’ about number 10, but because we have 10 fingers, the decimal notation (from Latin decem and Greek Deka: 10) seems ‘natural’ to us. If the world would be like Simpsons (and I am glad it is not) the natural notation would be octal (8 fingers)

1/15/2015 Slide # 3 Binary, Octal and Hex Numbers Copyright Thaddeus Konar Decimal Integers Each digit (counting from the right) represents next power of ten, the rightmost digit represents 1s, next digit represents 10s, next 100s, and so on: …,10000, 1000, 100, 10, 1 which is the same as: …,10 4,10 3, 10 2, 10 1, 10 0 (Please remember that any number X to zero (0) power equals 1!) X 0 = 1

1/15/2015 Slide # 4 Binary, Octal and Hex Numbers Copyright Thaddeus Konar Decimal Integers (cont) 7845 means: (5*1)+(4*10)+(8*100)+(7*1000) and this is same as: (5*10 0 )+(4*10 1 )+(8*10 2 )+(7*10 3 )

1/15/2015 Slide # 5 Binary, Octal and Hex Numbers Copyright Thaddeus Konar Decimal Integers (Cont) What does ‘really’ mean: * 1 4 * 10 3 * 100 =5 =40 =300 8 * 1000= * =50000 =58345

1/15/2015 Slide # 6 Binary, Octal and Hex Numbers Copyright Thaddeus Konar Decimal Integers (cont) Lets look at the properties of the decimal integers: Base = 10 (1, 10, 100, …) (10 0, 10 1, 10 2, …) Digits range: 0 -> 9 (0,1,2,3,4,5,6,7,8,9) Number of values represented by a single digit: 10 Please note that number of digits equals Base, and range goes from zero to (Base –1). Digits range: 0 -> (Base - 1) Number of values represented by a single digit: Base

1/15/2015 Slide # 7 Binary, Octal and Hex Numbers Copyright Thaddeus Konar General Notation Any number is represented by combination of single digits D x, where x is the position of the digit counting from the right. The value of D x can be only the digits between (and including) 0 and (Base-1). …D 5 D 4 D 3 D 2 D 1 D 0 Using our example decimal number 7845 D 0 =5, D 1 =4, D 2 =8, and D 3 =7

1/15/2015 Slide # 8 Binary, Octal and Hex Numbers Copyright Thaddeus Konar General Notation (cont) We can see that any number really means: (D 0 *B 0 )+(D 1 *B 1 )+(D 2 *B 2 )+(D 3 *B 3 )+…(D n *B n ) In our example number 7845 (base 10) means: (5*10 0 )+(4*10 1 )+(8*10 2 )+(7*10 3 )=

1/15/2015 Slide # 9 Binary, Octal and Hex Numbers Copyright Thaddeus Konar Binary Integers 1 Just as the each digit (position) in decimal integer is represented by the power of 10, binary integers are numbers where each digit is represented by the power of 2 (Base = 2). Digits range: 0 -> (Base - 1) Number of values represented by a single digit: Base Digits range: 0 -> 1(0,1) Number of values represented by a single digit: 2

1/15/2015 Slide # 10 Binary, Octal and Hex Numbers Copyright Thaddeus Konar Binary Integers 2 In the decimal number the digits could be 0,1,2,3,4,5,6,7,8,9. (0 -> Base-1). As we can see the binary number digits could only be either 0 or 1 (0 ->Base-1). The single decimal number can represent 10 values, and the single binary number can represent only 2 values.

1/15/2015 Slide # 11 Binary, Octal and Hex Numbers Copyright Thaddeus Konar Binary Integers 3 Binary integer will be a combination of 1s and 0s. Please recall the formula (and remember that now Base=2): (D 0 *B 0 )+(D 1 *B 1 )+(D 2 *B 2 )+(D 3 *B 3 )+…(D n *B n ) Lets look at the binary number D 0 =0, D 1 =1, D 2 =1, D 3 =1, D 4 =0, D 5 =1 B 0 =1, B 1 =2, B 2 =4, B 3 =8, B 4 =16, B 5 =32, B 6 =64…

1/15/2015 Slide # 12 Binary, Octal and Hex Numbers Copyright Thaddeus Konar Binary Integers 4 Here are the first few binary numbers: … means: (0*2 0 )+(1*2 1 )+(1*2 2 )+(1*2 3 )+(0*2 4 )+(1*2 5 ) = (0*1)+(1*2)+(1*4)+(1*8)+(0*16)+(1*32) = = = = = = = = = = = = = = = = = = = = = 19 10

1/15/2015 Slide # 13 Binary, Octal and Hex Numbers Copyright Thaddeus Konar Binary Conversion Example Convert binary number to decimal: * 1 1 * 2 1 * 4 =1 =2 =4 0 * 8=0 1 * 16 =16 =23

1/15/2015 Slide # 14 Binary, Octal and Hex Numbers Copyright Thaddeus Konar Convert binary number to decimal: * 1 0 * 2 0 * 4 =1 =0 1 * 8=8 1 * 16 =16 =185 1 * 32=32 0 * 64=0 1 * 128=128

1/15/2015 Slide # 15 Binary, Octal and Hex Numbers Copyright Thaddeus Konar Octal Integers 1 Just as the each digit (position) in decimal integer is represented by the power of 10, in binary integer each digit represents power of 2, in octal numbers each digit is represented by the power of 8 (Base = 8). Digits range: 0 -> (Base - 1) Number of values represented by a single digit: Base Digits range: 0 -> 7(0,1, 2, 3, 4, 5, 6, 7) Number of values represented by a single digit: 8

1/15/2015 Slide # 16 Binary, Octal and Hex Numbers Copyright Thaddeus Konar Octal Integers 2 In the decimal number the digits could be 0,1,2,3,4,5,6,7,8,9. (0 -> Base-1), in binary 0,1 (Base-1), so as you can suspect in octal numbers the digits would be 0,1,2,3,4,5,6,7 (0 -> Base- 1). The single decimal number can represent 10 values, the single binary number can represent only 2 values, and single octal number can represent 8 values.

1/15/2015 Slide # 17 Binary, Octal and Hex Numbers Copyright Thaddeus Konar Octal Integers 3 In octal integers Base = 8. Please recall the formula: (D 0 *B 0 )+(D 1 *B 1 )+(D 2 *B 2 )+(D 3 *B 3 )+…(D n *B n ) Lets look at the octal number 4153 D 0 =3, D 1 =5, D 2 =1, D 3 =4 B 0 =1, B 1 =8, B 2 =64, B 3 =512, B 4 =4096…

1/15/2015 Slide # 18 Binary, Octal and Hex Numbers Copyright Thaddeus Konar Octal Integers 4 Here are the first few octal numbers: …4153 means: (3*8 0 )+(5*8 1 )+(1*8 2 )+(4*8 3 ) = (3*1)+(5*8)+(1*64)+(4*512) = = = = = = = = = = = = = = = = = = = = = 19 10

1/15/2015 Slide # 19 Binary, Octal and Hex Numbers Copyright Thaddeus Konar Hexadecimal (Hex) Integers 1 Just as the each digit (position) in decimal integer is represented by the power of 10, in binary integer - power of 2, in octal numbers - power of 8, and in hex integers – power of 16 (Base = 16). Digits range: 0 -> (Base - 1) Number of values represented by a single digit: Base Digits range: 0 -> 15 (0,1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F) Number of values represented by a single digit: 16

1/15/2015 Slide # 20 Binary, Octal and Hex Numbers Copyright Thaddeus Konar Hex Integers 2 In the decimal number the digits could be 0,1,2,3,4,5,6,7,8,9. (0 -> Base-1), in binary 0,1 (Base-1), in octal 0,1,2,3,4,5,6,7. (0 -> Base-1). In hex numbers the digits would be 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F (0 -> Base-1). The letters A through F represent the decimal numbers 10 to 15. The single decimal number can represent 10 values, the single binary number can represent only 2 values, the single octal number can represent 8 values, and the single hex number can represent 16 values.

1/15/2015 Slide # 21 Binary, Octal and Hex Numbers Copyright Thaddeus Konar Hex Integers 3 In Hex integers Base = 16. Please recall the formula: (D 0 *B 0 )+(D 1 *B 1 )+(D 2 *B 2 )+(D 3 *B 3 )+…(D n *B n ) Lets look at the octal number A59C D 0 =C, D 1 =9, D 2 =5, D 3 =A B 0 =1, B 1 =16, B 2 =256, B 3 =4096, B 4 =65536…

1/15/2015 Slide # 22 Binary, Octal and Hex Numbers Copyright Thaddeus Konar Hex Integers 4 Here are the first few hex numbers: …A59C means: (12*16 0 )+(9*16 1 )+(5*16 2 )+(A*16 3 ) = (12*1)+(9*16)+(5*256)+(10*4096) = = = = C 16 = = = = = D 16 = = = = A 16 = E 16 = = = = B 16 = F 16 = = 19 10

1/15/2015 Slide # 23 Binary, Octal and Hex Numbers Copyright Thaddeus Konar Relationship between Binary and Octal Numbers = Converting to Octal: Binary: = Octal: = each octal digit is 3 bits

1/15/2015 Slide # 24 Binary, Octal and Hex Numbers Copyright Thaddeus Konar Relationship between Binary and Hex Numbers = Converting to Hex: Binary: = Hex: 5 A = each hex digit is 4 bits

1/15/2015 Slide # 25 Binary, Octal and Hex Numbers Copyright Thaddeus Konar Relationship between Binary, Octal and Hex Numbers Converting to Octal: Converting to Hex: B 7 2 D 5 A

1/15/2015 Slide # 26 Binary, Octal and Hex Numbers Copyright Thaddeus Konar Relationship between Binary, Octal and Hex Numbers 2 DecimalBinaryOctal (3 binary digits)Hex (4 binary digits) A B C D E F ( )13 ( )

1/15/2015 Slide # 27 Binary, Octal and Hex Numbers Copyright Thaddeus Konar "nobody wants to be a 0 but everybody wants to be a 1" Laurie Anderson - Home of the Brave