Hexadecimal Dk Izzati Pg Haji Ahmad.

Slides:



Advertisements
Similar presentations
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.
Advertisements

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.
Information Processing
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:
Chapter Chapter Goals Know the different types of numbers Describe positional notation.
Data Representation in Computers
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.
Number Systems and Arithmetic
Binary, Decimal, & Hexadecimal Numbers
 Binary Binary  Binary Number System Binary Number System  Binary to Decimal Binary to Decimal  Decimal to Binary Decimal to Binary  Octal and Hexadecimal.
Binary Numbers.
Number Systems.
Numbering systems.
1 Number SystemsLecture 8. 2 BINARY (BASE 2) numbers.
The Wonders of Conversion. A number system is a system in which a number is represented. There are potential infinite number systems that can exist (there.
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,
Lecture 2 Bits, Bytes & Number systems
Number Systems Ron Christensen CIS 121.
CCE-EDUSAT SESSION FOR COMPUTER FUNDAMENTALS Date: Session III Topic: Number Systems Faculty: Anita Kanavalli Department of CSE M S Ramaiah.
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.
Number Representation. Representing numbers n Numbers are represented as successive powers of a base, or radix.
CPS120: Introduction to Computer Science Computer Math: Converting to Decimal.
Positional Notation 642 in base 10 positional notation is:
Chapter 2 Data Representation.
Number System sneha.
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.
Octal to Decimal Hexadecimal DecimalOctal Binary.
Data Representation Hexadecimal  Although computers work in binary it is sometimes inconvenient for humans to read everything in Binary. For example in.
DECIMALBINARY a) b) c) d) e) f) Revision Exercise DECIMALBINARY a) b) c)
Binary01.ppt Decimal Decimal: Base 10 means 10 Unique numerical digits ,00010,000 Weight Positions 3,
Springfield Technical Community College Center for Business and Technology.
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.
NUMBER SYSTEMS.
MODULE –I NUMBER SYSTEM Digital Design Amit Kumar Assistant Professor SCSE, Galgotias University, Greater Noida.
ECE 362 Microprocessor Systems and Interfacing ©5-1 Lecture 1 Hexadecimal Computation Outline n Decimal n Binary n Octal n Hexadecimal.
ABFC... Home page Introduction Binary number system Hexadecimal number system Binary coded decimal Objectives Octal number system Click.
ECE DIGITAL LOGIC LECTURE 2: DIGITAL COMPUTER AND NUMBER SYSTEMS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 01/14/2016.
CS151 Introduction to Digital Design Chapter 1: Digital Systems and Information Lecture 2 1Created by: Ms.Amany AlSaleh.
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.
Number Systems. ASCII – American Standard Code for Information Interchange – Standard encoding scheme used to represent characters in binary format on.
Chapter 5 NUMBER REPRESENTATION AND ARITHMETIC CIRCUITS.
Base 16 (hexadecimal) Uses the decimal digits and the first letters of the alphabet to encode 4 binary bits (16=2 4 ) abcdef or ABCDEF.
Dr. Nermin Hamza 1. Materials Book: Digital Design 4 th M. Morris Mano and Michael D. Ciletti 2.
Digital Design Chapter One Digital Systems and Binary Numbers
Octal to Decimal Decimal Octal Binary Hexadecimal.
Discrete Mathematics Numbering System.
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.
Lecture 3: Binary values and number systems
Number Systems.
ITE102 – Computer Programming (C++)
CSE 102 Introduction to Computer Engineering
Number Systems Lab session 1 Xuan Guo.
2.0 COMPUTER SYSTEM 2.2 Number System and Representation
Number System conversions
Chapter 1 Number Systems & Conversions
Hexadecimal Conversions
Numbering System TODAY AND TOMORROW 11th Edition
Digital Electronics and Microprocessors
Digital Logic Design (CSNB163)
Chapter 2 Number Systems.
Chapter 2 Number Systems.
Chapter 2 Number Systems.
Information Representation
Chapter 2 Number System.
Chapter 2 Number Systems.
1. Number Systems Chapt. 2.
Presentation transcript:

Hexadecimal Dk Izzati Pg Haji Ahmad

Hex Hexadecimal (also base 16, or hex) is a positional numeral system with a radix, or base, of 16. It uses sixteen distinct symbols, most often the symbols 0–9 to represent values zero to nine, and A, B, C, D, E, F (or alternatively a through f) to represent values 10 - 15. For example, the hexadecimal number 2AF3 is equal, in decimal, to (2 × 163) + (10 × 162) + (15 × 161) + (3 × 160) , or 10,995. Each hexadecimal digit represents four binary digits, and the primary use of hexadecimal notation is as a human-friendly representation of binary coded values in computing and digital electronics. For example, byte values can range from 0 to 255 (decimal) but may be more conveniently represented as two hexadecimal digits in the range 00 through FF.

Conversion of binary to hex Given a binary number, in order to convert it to a hex number, first of all, split the binary number into groups of 4 bits starting from the right. Example: 10011011₂ 1001 1011 Hence, 10011011₂ = 9B₁₆ 9 B

= (2 x 16³) + (10 x 16²) + (15 x 16¹) + (3 x 16⁰) Conversion of hex to decimal To convert hex to decimal, there are more than 1 alternative but the easiest way is to multiply each figure of the hex digit with 16ⁿ starting with the power of 0 (starts from the rightmost). Confusing? Let’s take a look at the example below: Example: Given a hex number 2AF3, convert it to a decimal. 2AF3 = (2 x 16³) + (10 x 16²) + (15 x 16¹) + (3 x 16⁰) = 8192 + 2560 + 240 + 3 = 10,995 The power of 16 should start from 0 and not 1 and it should begin from the rightmost of the hex number. The hex digit represented by an alphabet should be expand to a decimal number

How about the conversion of decimal to hex? Let’s take a look at the table below. Example 1: Decimal Numberc Operation Quotient Remainder Hexadecimal Result 1792 112 7 ÷ 16 = DONE. 00 700

Example 2: 48879 3054 190 11 ÷ 16 = Done. 15 14 F EF EEF BEEF        Example 2: Decimal Number Operation Quotient Remainder  Hexadecimal Result 48879 3054 190 11 ÷ 16 = Done. 15 14 F EF EEF BEEF

Conversion of hex to octal To convert a hexadecimal number to an octal number, the first thing to do is to convert the hex number into something which is common between the two numeral system: BINARY. Each hex digit is represented by 4-bits binary E.g.: Convert AF6D to an octal. A = 10 = 1010 F = 15 = 1111 6 = 0110 D = 13 = 1101 Hence, AF6D = 1010111101101101 An octal number is represented by 3-bits binary. Hence, starting from the right most side, divide the number above (hex converted to binary) into 3-bits binary. 1010111101101101  1 010 111 101 101 101

Hence, the answer for the conversion of AF6D to octal is 1275558 1010 1111 0110 1101 Divide the binary every 3-bits starting from right to left 1 010 111 101 101 101 ADD 0 to the last set if it is not exactly 3-bits 001 010 111 101 101 101 Change each set of 3-bits into decimal 1 2 7 5 5 5

Exercise 1. Convert the following binary numbers to hexadecimal a Exercise 1. Convert the following binary numbers to hexadecimal a. 0111 b. 1101 c. 1011011 d. 11101100 e. 100101101 f. 0101101011110000 g. 00000000000000000001 h. 11001010111001101011010011

2. Convert the following hexadecimal numbers to binary: ADEA AF-05-12-57 00-00-0C-9F-F2-A9 00-00-5E-00-00-00 123456789ABCDEF F0E1D2C3B4A59687 B0C 1000

3. Convert the following hexadecimal numbers to decimal: a. AA b. 123F c. FEDCBA d. D0-BE-D0 e. B8C f. FF-FF-FF-FA g. 10 h. FABE

4. Convert the following decimal numbers to hexadecimal: 9 32 73 255 1,025 4,099 65536 1,048,575