Ours is not to reason why Ours is to Invert and Multiply…

Slides:



Advertisements
Similar presentations
IP Addressing Terminology
Advertisements

CSC 2510 Test 3 1. Give the names of the formula or rule that provides the answer for each of the following problems. Do not try to solve the problems!
Monika Gope Lecturer IICT, KUET
Binary Review. LETS REVIEW THE BINARY SYSTEM Binary symbols (O / I) represent electrical impulses. SendsElectricity Receives.
Binary Values and Number Systems
IP Addressing & Subnetting!!!.
Binary Lesson 4 Hexadecimal and Binary Practice. Counting to 15 Base Base Base 16 Base Base Base 16 Two Ten (Hex) Two Ten (Hex)
Place value What do we mean by place value?
Number Systems Different number systems Representation of numbers in binary Conversion between decimal and binary, Conversion between binary and hexadecimal.
Binary, Hexadecimal, and Base 10.
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.
James Tam Beyond base 10: Non-decimal based number system What exactly is decimal? How do other number systems work (binary, octal and hex) How to convert.
Kavita Hatwal Fall The decimal system, also called the base 10 number system is based on ten numbers: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. All the numbers.
Number Systems. 2 The total number of allowable symbols in a number system is called the radix or base of the system. Decimal Numbers: radix = 10 (symbols:
Computer Number Systems This presentation will show conversions between binary, decimal, and hexadecimal numbers.
Computer Systems 1 Fundamentals of Computing
 Binary Binary  Binary Number System Binary Number System  Binary to Decimal Binary to Decimal  Decimal to Binary Decimal to Binary  Octal and Hexadecimal.
Binary “There are 10 types of people in the world… those that understand binary and those that don’t.”
Binary Conversions Number systems Binary to decimal Decimal to binary.
Numbering Systems Decimal (Denary) base 10. Clumsy when dealing with computers. Other systems –Binary –Octal –Hexadecimal Convenient when dealing with.
Hexadecimal Dk Izzati Pg Haji Ahmad.
Number Systems.
Lecture for Week Spring.  Numbers can be represented in many ways. We are familiar with the decimal system since it is most widely used in everyday.
Numbering systems.
Number Systems Binary and Hexadecimal. Base 2 a.k.a. Binary  Binary works off of base of 2 instead of a base 10 like what we are taught in school 
Numeral Systems Subjects: Numeral System Positional systems Decimal
Numeration Systems Introduction to Binary, Octal, and Hexadecimal.
1 Number SystemsLecture 8. 2 BINARY (BASE 2) numbers.
Computer System & Binary Review. Memory Model What memory is supposed to look like.
DECIMAL BASE Based on power of 10 In the number 2,468 – from right to left -- the 8 represents the ones, the 6 represents the tens, the 4 represents the.
Number systems: binary, decimal, hexadecimal and octal. Conversion between various number systems Number systems: binary, decimal, hexadecimal and octal.
Number systems, Operations, and Codes
Numbering System Base Conversion. Number systems Decimal – 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 Binary – 0, 1 Octal – 0, 1, 2, 3, 4, 5, 6, 7 Hexadecimal system.
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.
Binary01.ppt Decimal Decimal: Base 10 means 10 Unique numerical digits ,00010,000 Weight Positions 3,
Announcement!!! First exam next Thursday (I’m trying to give you a first exam before the drop date) I’ll post a sample exam over the weekend and will try.
Discrete Mathematics Numbering System.
Number Systems by Dr. Amin Danial Asham. References  Programmable Controllers- Theory and Implementation, 2nd Edition, L.A. Bryan and E.A. Bryan.
NUMBER SYSTEMS.
ECE 362 Microprocessor Systems and Interfacing ©5-1 Lecture 1 Hexadecimal Computation Outline n Decimal n Binary n Octal n Hexadecimal.
Number Systems – Definitions page 214 The radix or base 밑 refers to the number b in an expression of the form b n. The number n is called the exponent.
Number Systems. Topics  The Decimal Number System  The Binary Number System  Converting from Binary to Decimal  Converting from Decimal to Binary.
 2012 Pearson Education, Inc. Slide Chapter 4 NumerationSystems.
ECE DIGITAL LOGIC LECTURE 2: DIGITAL COMPUTER AND NUMBER SYSTEMS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 01/14/2016.
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.
Number Systems & Binary How to count. How do we represent numbers? Early systems: – Actual count : ||||| = 5 – Roman numers : XI = 11 Hard to do math:
Chapter 32 Binary Number System. Objectives After completing this chapter, you will be able to: –Describe the binary number system –Identify the place.
Conversions 1)Binary to Denary Method 1 Work out the position values of the binary bits and add those values together So above would be
Chapter 4 Numeration and Mathematical Systems © 2008 Pearson Addison-Wesley. All rights reserved.
1. Binary, Decimal, Hexadecimal and Octal. 2. Conversion between various number systems. Number Systems:
Binary & Hex Review.
Appendix F Number Systems binary 0, 1 0, 1, 2, 3, 4, 5, 6, 7
Decimal Numbers.
Introduction To Number Systems
Octal to Decimal Decimal Octal Binary Hexadecimal.
Discrete Mathematics Numbering System.
ITE102 – Computer Programming (C++)
2.0 COMPUTER SYSTEM 2.2 Number System and Representation
Number Systems & Binary
Tools of Web Development 1: Module A: Numbering Systems
Number System conversions
Number Systems and Binary Arithmetic
Chapter 2: Number Systems
Converting from Base-n to Base-10
Binary & Hex Review.
Chapter 2 Number System.
Presentation transcript:

Ours is not to reason why Ours is to Invert and Multiply… Numbering Systems Ours is not to reason why Ours is to Invert and Multiply…

Numbering Systems Since early times mankind has used many different types of symbols to represent numbers In North America we use the Base 10 system. There are several different types of number systems. Each is used for different purposes and each is different, yet similar. Binary (used in computers) Base 2 Hexadecimal(used in computers) Base 16 Decimal (used in North America) Base 10

Decimal (Base 10) It consists of 10 digits (hence the name decimal). The digits, from smallest to largest are: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. Now, any number can be broken down into columns. From right to left, the first column is the 1's column, then the 10's column, then the 100's, then the 1000's, etc.. 0 X 1000 = 0 (0 thousands) 1 X 100 = 100 (1 hundreds) 3 X 10 = 30 (3 tens) 7 X 1 = 7 (7 ones) 0+100 + 30 + 7 = 137

An Example lets try the number 77: 0 X 1000 = 0 (0 thousands) 0 X 100 = 0 (0 hundreds) 7 X 10 = 70 (7 tens) 7 X 1 = 7 (7 ones) 0+0+70 + 7 = 77

Binary (Base 2) Your computer works using the binary numbering system. The binary numbering system is ideal for representing these two states because it consists of only two digits. Once again, any number can be broken down into columns. Using the binary numbering system, from right to left, the first column is the 1's column,the 2's column, the 4's, the 8's, the 16's column, the 32's column, etc..

Let's look at the number 137 again 1 X 128 = 128 (1 one hundred twenty-eights) 0 X 64 = 0 (0 sixty-fours) 0 X 32 = 0 (0 thirty-twos) 0 X 16 =0 (0 sixteen's) 1 X 8 = 8 (1 eights) 0 X 4 = 0 (0 fours) 0 X 2 = 0 (0 twos) 1 X 1 = 1 (1 ones) 128 64 32 16 8 4 2 1

Converting Decimal to Binary There are a number of ways to convert between decimal and binary. Lets start with converting the decimal value 254 to binary. Method 1: Use the binary calculator. What we have been doing before. 20 21 22 23 24 25 Method 2: Divide the number by 2. Then divide what's left by 2, and so on until there is nothing left (0). Write down the remainder (which is either 0 or 1) at each division stage. Once there are no more divisions, list the remainder values in reverse order. This is the binary equivalent.

254 / 2 giving 127 with a remainder of 0 Reading in reverse order(Bottom to top) 1111110 Tada.. Not too shabby!

Another example, 132 decimal 132 / 2 giving 66 with a remainder of 0 66 / 2 giving 33 with a remainder of 0 33 / 2 giving 16 with a remainder of 1 16 / 2 giving 8 with a remainder of 0 8 / 2 giving 4 with a remainder of 0 4 / 2 giving 2 with a remainder of 0 2 / 2 giving 1 with a remainder of 0 1 / 2 giving 0 with a remainder of 1 Thus the binary equivalent is 10000100

128 + 0 + 0 + 0 + 8 + 0 + 0 + 1 = 137 Thus, the binary number 10001001 is equal to 137 decimal. A single digit (0 or 1) is called a 'bit' (binary digit). The table above contains 8 bits. Each column can contain either a 1 or a 0 ( 'cause there is only 2 digits in the binary numbering system). So, as you can see, it takes 8 bits to represent the decimal number 137. lets try the number 77: 128 64 32 16 8 4 2 1

0 X 128 = 0 (0 one hundred twenty-eights) 1 X 64 = 64 (1 sixty-fours) 0 X 32 = 0 (0 thirty-twos) 0 X 16 =0 (0 sixteen's) 1 X 8 = 8 (1 eights) 1 X 4 = 4 (1 fours) 0 X 2 = 0 (0 twos) 1 X 1 = 1 (1 ones) 0 + 64 + 0 + 0 + 8 + 4 + 0 + 1 = 77 Thus, the binary number 01001101 is equal to 77 decimal

Solve the first two rows using a binary calculator Then solve the last 2 rows using division. 254 8 127 13 255 1020 397 9999 20 5 16 99 178 33 207 3578

Hexadecimal Number System [Base-16] The hexadecimal number system uses SIXTEEN values to represent numbers. The values are 0 1 2 3 4 5 6 7 8 9 A B C D E F With 0 having the least value and F having the greatest value. Hexadecimal is often used to represent values [numbers and memory addresses] in computer systems.

Converting hexadecimal to decimal Convert 176 in hexadecimal to decimal Each column represents a power of 16,   176 = ---- 6 * 160 = 6 ----- 7 * 161 = 112 ------ 1 * 162 = 256 ------ = 374 Convert 11 in hexadecimal to base 10 11 = 1 * 160 = 1 * 161 = 16 + 1 = 17

Practice Hex to Decimal 3DA D9E F3A1 09 6612 55 44A9 645 3D 14DE F309 B8A4

Converting binary to hexadecimal Convert 10110 to hexadecimal. Each hexadecimal digit represents 4 binary bits. Split the binary number into groups of 4 bits, starting from the right. 1 0110 = 1 = 6 = 16 in hexadecimal. Try 1111110 base 2 to base 16 What did you get ??

Practice Bin to Hex 1010101 1000100 0010010 0101101 11110111 101010101 11111110 1110001 11011100 1011100 1000 1110

Converting decimal to hexadecimal Convert 232 decimal to hexadecimal. Use the same method used earlier to divide decimal to binary, but divide by 16 this time. 232 / 16 = 14 with a remainder of 8 8 / 16 = you can’t have since 8 is smaller than 16. So the 8 becomes the last digit. So you get 14 and a 8. Remember… (14 decimal = E)  = E816 A=10, B=11, C=12, D=13, E=14, F=15

Practice Decimal to Hex 15 15831 902 55 6612 5589 13 91145 3 14 309 84 96 11 1449 64000

Notation To avoid confusion, we often add a suffix to indicate the number of the base. 162h h means hexadecimal 16216 16 means base 16  162d d means decimal 16210 10 means base 10 162o o means octal 1628 8 means base 8  101b b means binary 1012 2 means base 2

More Converting For Review, Work on the handout called “Digital 1” Specific problems or questions come and ask me. Copy and complete the following charts in your books.

Binary Hex Decimal 101010102 001100112 111111112 101110102 111100102 001000112 000100012 100000002 100101012

Hex Binary Decimal 345 AF56 78C1 B0D5 7156 9 185 FFFF FFF FF

Decimal Hex Binary 345 32768 255 1289 15 1000 1024 999 1678 2000