Writer:-Rashedul Hasan. Editor:- Jasim Uddin

Slides:



Advertisements
Similar presentations
DATA REPRESENTATION CONVERSION.
Advertisements

2.2 General Positional-Number-System Conversion
Binary & Decimal numbers = 3* * *10 + 5*1 = 3* * * *10 0 Decimal system: Ten digits: 0,1,2,3,…,9 Example:
Chapter Chapter Goals Know the different types of numbers Describe positional notation.
Chapter 02 Binary Values and Number Systems Nell Dale & John Lewis.
1 Number Systems. 2 Numbers Each number system is associated with a base or radix – The decimal number system is said to be of base or radix 10 A number.
Converting Binary to Octal
Computer Systems 1 Fundamentals of Computing
Number Systems and Arithmetic
BASICS OF COMPUTER APPLICATIONS ASB 102. UNIT 1 Introducing computer system  Number system  What is number system?  Types of number system  Their.
Binary Numbers.
Converting binary to decimal decimal to binary
Revision Introductory Lesson
Binary and Hexadecimal Numbers
Number Systems.
Numbering systems.
1 Number SystemsLecture 8. 2 BINARY (BASE 2) numbers.
Number systems: binary, decimal, hexadecimal and octal. Conversion between various number systems Number systems: binary, decimal, hexadecimal and octal.
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,
Number systems, Operations, and Codes
Positional Notation 642 in base 10 positional notation is:
Number Base Conversions
Digital Electronics Octal & Hexadecimal Number Systems.
Octal to Decimal Hexadecimal DecimalOctal Binary.
AEEE2031 Data Representation and Numbering Systems.
Binary01.ppt Decimal Decimal: Base 10 means 10 Unique numerical digits ,00010,000 Weight Positions 3,
Discrete Mathematics Numbering System.
Chapter 2 Number Systems Consists of a set of symbols called digits and a set of relations such as +, -, x, /.
Digital Fundamentals Tenth Edition Floyd Chapter 2 © 2008 Pearson Education.
Octal & Hexadecimal Number Systems
Computer Number System
Chapter 1 Number Systems Digital Electronics. Topics discussed in last lecture Digital systems Advantages of using digital signals over analog. Disadvantages.
* Numeral Systems: A writing method for expressing numbers is called a “Numeral System". In the most common numeral system, we write numbers with combinations.
ABFC... Home page Introduction Binary number system Hexadecimal number system Binary coded decimal Objectives Octal number system Click.
CS151 Introduction to Digital Design Chapter 1: Digital Systems and Information Lecture 2 1Created by: Ms.Amany AlSaleh.
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 and Binary Arithmetic Quantitative Analysis II Professor Bob Orr.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd.
Binary Values. Numbers Natural Numbers Zero and any number obtained by repeatedly adding one to it. Examples: 100, 0, 45645, 32 Negative Numbers.
1. Binary, Decimal, Hexadecimal and Octal. 2. Conversion between various number systems. Number Systems:
Programmable Logic Controller
Binary & Decimal numbers
Introduction To Number Systems
Digital Design Chapter One Digital Systems and Binary Numbers
Octal to Decimal Decimal Octal Binary Hexadecimal.
Discrete Mathematics Numbering System.
Number Systems.
COMPUTING FUNDAMENTALS
ITE102 – Computer Programming (C++)
Base ‘b’ number for i = 0 to n – 1 for an n digit quantity
Location in course textbook
Number System conversions
IT 0213: INTRODUCTION TO COMPUTER ARCHITECTURE
Number Systems and Binary Arithmetic
Introduction to IT By: Muhammed s. anwar.
Binary Number System And Conversion
Numbering System TODAY AND TOMORROW 11th Edition
Octal & Hexadecimal Number Systems
Chapter 2: Number Systems
Chapter Four Data Representation in Computers By Bezawit E.
Chapter 2 Number Systems.
Number Systems Rayat Shikshan Sanstha’s
Chapter 2 Number Systems.
Number Systems Rayat Shikshan Sanstha’s
Chapter 2 Number Systems.
Chapter 2 Number System.
UNIT – 3 & 4. Data Representation and Internal
Chapter 2 Number Systems.
Presentation transcript:

Writer:-Rashedul Hasan. Editor:- Jasim Uddin Number system Writer:-Rashedul Hasan. Editor:- Jasim Uddin

Commonly used Number System Base Number system Digits/symbol used 2 Binary 0,1 8 Octal 0,1,2,3,4,5,6,7 10 Decimal 0,1,2,3,4,5,6,7,8,9 16 Hexadecimal 0,1,2,3,4,5,6,7,8,9, A,B,C,D,E,F

Decimal Number System The decimal numeral system has ten as its base. It is the most widely used numeral system, perhaps because humans have ten digits over both hands. uses various symbols (called digits) for no more than ten distinct values (0, 1, 2, 3, 4, 5, 6, 7, 8 and 9) to represent any numbers,

Decimal Number System The decimal system is a positional numeral system; it has positions for units, tens, hundreds, etc. The position of each digit conveys the multiplier (a power of ten) to be used with that digit—each position has a value ten times that of the position to its right.

For example 848 8 Hundreds or 8*100 or 8*102 4 tens or 4*10 or 4*101 8 units or 8*1 or 8*100

Form the example, Both the 8 are not equal. Left most 8 occupies the hundred or 102 position is called MSD that is Most Significant digit. Right most 8 occupies the units or 100 position is called LSD that is Least Significant digit. The total value=8*102 + 4*101 +8*100 = 800+40+8 848.

Another example 1492.76 1 thousand or 1*1000 or 1* 103 4 Hundreds or 4*100 or 4*102 9 tens or 9*10 or 9*101 2 units or 2*1 or 2*100 7 tenths or 7*0.1 or 7*10-1 6 hundredths or 6*0.01 or 6*10-2

Total value = 1* 103 + 4*102 + 9*101 + 2*100 + 7*10-1 + 6*10-2 = 1000+400+90+2+0.7+0.06 =1492.76

Binary Number System The binary numeral system, or base-2 number system, is a numeral system that represents numeric values using two symbols, 0 and 1. The digits in binary system are called bits. In binary number system, the value of each digit is based on 2, and powers of 2.

Since binary is a base-2 system, each digit represents an increasing power of 2, with the rightmost digit representing 20, the next representing 21, then 22, and so on. 25 24 23 22 21 20 In binary system, if the bit is zero (0), its value is zero.

Bit: O or 1 Byte: a group of 8 bits is called Byte. Word: a group of 16 bits is called Word. Kilobytes KB 210 Megabyte MB 220 Gigabyte GB 230 Terabyte TB 240

Binary to Decimal If the digit is one (1), its value is determined by its position from the right. For example, the binary number 100101 is converted to decimal form by, [(1) × 25] + [(0) × 24] + [(0) × 23] + [(1) × 22] + [(0) × 21] + [(1) × 20] = [1 × 32] + [0 × 16] + [0 × 8] + [1 × 4] + [0 × 2] + [1 × 1] = 37

Decimal to Binary Divide the number by 2, the remainder is either 0 or 1. Place the remainder to the right of partial quotient obtained in step 1. Divide the partial quotient of step 1 by 2, placing the remainder to the right of new partial quotient Repeat the step 1,2,3 until a quotient of zero is obtained. The binary number is equal to the remainders arranged so that first remainder is the LSB and the last remainder is MSB of binary number.

Operation Remainder 118 ÷ 2 = 59 0 59 ÷ 2 = 24 1 29 ÷ 2 = 14 1 14 ÷ 2 = 7 0 7 ÷ 2 = 3 1 3 ÷ 2 = 1 1 1 ÷ 2 = 0 1 Reading the sequence of remainders from the bottom up gives the binary numeral 11101102

Decimal to Binary 47 Dividers number remainders 2 47 2 23 1 (LSB) 2 47 2 23 1 (LSB) 2 11 1 2 5 1 2 2 1 2 1 0 0 1 (MSB) 4710 = 101111

Decimal to Binary 76 Dividers number remainders 2 76 2 38 0 (LSD) 2 76 2 38 0 (LSD) 2 19 0 2 9 1 2 4 1 2 2 0 2 1 0 0 1(MSD) 7610 = 1001100

Incase of Fraction 0.625 Multiplier decimal fraction 2 * 0.625 1.25 1 2 * 0.625 1.25 1 2 * 0.25 .5 0 2 * .5 1.0 1

Incase of Fraction 0.86 Multiplier decimal fraction 2 * 0.86 1.72 1 2 * 0.86 1.72 1 2 * 0.72 1.44 1 2 * .44 .88 0 2 * .88 1.76 1

87.125 87 [Integral part] Dividers number remainders 2 87 2 43 1 (LSD) 2 87 2 43 1 (LSD) 2 21 1 2 10 1 2 5 0 2 2 1 2 1 0 0 1(MSD) 8710 = 1010111

87.125 .125 [Fraction part] Multiplier decimal fraction 2 * 0.125 .25 0 2 * 0.25 .5 0 2 * .5 1.0 1

Binary to Decimal 10101 1 0 1 0 1 20*1 = 1 21*0 = 0 22*1 = 4 23*0 = 0 1 0 1 0 1 20*1 = 1 21*0 = 0 22*1 = 4 23*0 = 0 24*1 = 16 21 101012 = 21

In case of fraction 0.1011 0. 1 0 1 1 2-1*1 = 0.5 2-2*0 = 0 0. 1 0 1 1 2-1*1 = 0.5 2-2*0 = 0 2-3*1 =0.125 2-4*1 = 0.0625 0.6875 0.1011 = 0.6875

Convert binary to Decimal 1101.1101

Octal Number system The octal number system has a base of eight. And they are, 0,1,2,3,4,5,6 and 7. The digit position of an octal number can have only value for 0 to 7. the digit positions in an octal number have weights as follows, 84 83 82 81 80 8-1 8-2 8-3 8-4

Decimal to Octal conversion Divide the Decimal number by 8 Place reminder to the right of partial quotient obtained in step 1. Divide the partial quotient of step 1 by 8, placing the remainder to the right of new partial quotient Repeat the step 1,2,3 until a quotient of zero is obtained. The binary number is equal to the remainders arranged so that first remainder is the LSD and the last remainder is MSD of octal number.

Decimal to Octal conversion 573 Dividers number remainders 8 573 8 71 5 (LSD) 8 8 7 8 1 0 0 1 (MSD) 57310 = 1075

Decimal to Octal conversion 2536 Dividers number remainders 8 2536 8 317 0 (LSD) 8 39 5 8 4 7 0 4 (MSD) 253610 = 4750

Octal to Decimal The extreme right hand digit is multiplied by 80 the second from the right by 81 and So on. Then add all this products to get decimal equivalent of the octal number. In case of octal fraction, multiply the first digit after octal point by 8-1, second digit from octal point by 8-2

Octal to Decimal 1075 1 0 7 5 80 * 5 = 5 81 * 7 = 56 82 * 0 = 0 1 0 7 5 80 * 5 = 5 81 * 7 = 56 82 * 0 = 0 83* 1 = 512 573

Octal to Decimal 0.44 0. 4 4 8-1 * 4 = 0.5 8-2 * 4 = 0.0625 0.5625

Octal to Decimal Assignment 4750 0.6256

Octal to Binary 576 5 7 6 111 101 110 576 = 101111110

Octal to Binary In case of Fraction 0.216 0. 2 1 6 010 001 110 0. 2 1 6 010 001 110 0.216 = 0.010001110

Octal to Binary 27.12

Binary to Octal Group the binary bits in three. For grouping the bits in three, move towards left from binary point. In case of even number, add zero or zeros at appropriate place. Replace each group of threes bits by equivalent octal numbers.

110111101 110 111 101 6 5 7

11000110 011 000 110 3 6

Assignment 1111000 Ans. 170

Hexadecimal The base is 16, it has 16 possible digit symbol. 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E and F The digit positions in an octal numbers have weights as follows, 164 163 162 161 160 16-1 16-2 16-3 16-4 Each hexadecimal digit represent group of four (4) binary digits. hexadecimal digit A-F are equivalent to decimal values 10 – 15.

Relationship between Hexadecimal, Decimal and Binary digits. 0000 1 0001 2 0010 3 0011 4 0100 5 0101 6 0110 7 0111 8 1000 9 1001 A 10 1010 B 11 1011 C 12 1100 D 13 1101 E 14 1110 F 15 1111

Decimal to Hexadecimal Divide the number by 16 Place reminder to the right of partial quotient obtained in step 1. Divide the partial quotient of step 1 by 16, placing the remainder to the right of new partial quotient Repeat the step 1,2,3 until a quotient of zero is obtained. The binary number is equal to the remainders arranged so that first remainder is the LSD and the last remainder is MSD of octal number.

Decimal to Hexadecimal 741 Dividers number remainders 16 741 16 46 5 (LSD) 16 2 14 i.e E 0 2(MSD) 74110 = 2E5

Decimal to Hexadecimal 2536

Decimal to Hexadecimal In case of Fraction 0.256 16 * 0.256 4.096 4 16 * 0.096 1.536 1 16 * 0.536 8.576 8 16 * 0.576 9.216 9

Decimal to Hexadecimal 0.3942

Decimal to Hexadecimal 97.236 Integral Part Dividers number remainders 16 97 16 6 1 (LSD) 16 0 6 (MSD)

Decimal to Hexadecimal Fraction Part Multiplier fraction & Partial product 16 * 0.236 3.776 3 16 * 0.776 12.416 12/C 16 * 0.416 6.656 6 16 * 0.656 10.496 10/A

Hexadecimal to Decimal 1F95 1 F 9 5 160 * 5 = 5 161 * 9 = 144 162 * F = 3840 163* 1 = 4096 8085

Hexadecimal to Decimal

Hexadecimal to Decimal 0.48 0. 4 8 16-1 * 4 = 0.25 16-2 * 8 = 0.03125 0.28125

Assignment 0.D2F 61.3C6A

Hexadecimal to Binary 59C 5 9 C 0101 1001 1100

Hexadecimal to Binary 0.2D6 0. 2 D 6 0010 1101 0110

Hexadecimal to Binary ABCD A B C D 1010 1011 1100 1101

Hexadecimal to Binary 11011110 1101 1110 D E

Hexadecimal to Binary 110000110 0001 1000 0110 1 8 6