Computing Theory – F453 Number Systems. Data in a computer needs to be represented in a format the computer understands. This does not necessarily mean.

Slides:



Advertisements
Similar presentations
A-Level Computing#BristolMet Session Objectives#9 express numbers in binary, binary-coded decimal (BCD), octal and hexadecimal; describe and use two’s.
Advertisements

Calculating in Other Bases
HEXADECIMAL NUMBERS Code
Company LOGO Edit your slogan here DKT 122/3 DIGITAL SYSTEM 1 WEEK #3 NUMBER SYSTEMS, OPERATION & CODES (PART 2)
Chapter 2 : Number System
Digital Fundamentals Floyd Chapter 2 Tenth Edition
CS 151 Digital Systems Design Lecture 3 More Number Systems.
Connecting with Computer Science, 2e
Data Representation in Computers
ENGIN112 L3: More Number Systems September 8, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 3 More Number Systems.
IT-101 Section 001 Lecture #4 Introduction to Information Technology.
Data Storage. SIGN AND MAGNITUDE Storing and representing numbers.
Number systems Converting numbers between binary, octal, decimal, hexadecimal (the easy way)
COMP201 Computer Systems Number Representation. Number Representation Introduction Number Systems Integer Representations Examples  Englander Chapter.
Hexadecimal and ASCII Lesson Objective: Understand the purpose of ASCII and how to use it. Lesson Outcome: Convert between Hexadecimal and ASCII Convert.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd.
Abstraction – Number Systems and Data Representation.
Numeral Systems Subjects: Numeral System Positional systems Decimal
EKT 121 / 4 ELEKTRONIK DIGIT 1 CHAPTER 1 : INTRODUCTION.
Data Representation S2. This unit covers how the computer represents- Numbers Text Graphics Control.
IT253: Computer Organization
Binary Arithmetic & Data representation
EX_01.1/46 Numeric Systems. EX_01.2/46 Overview Numeric systems – general, Binary numbers, Octal numbers, Hexadecimal system, Data units, ASCII code,
1 Digital Systems and Binary Numbers EE 208 – Logic Design Chapter 1 Sohaib Majzoub.
ECEN2102 Digital Logic Design Lecture 1 Numbers Systems Abdullah Said Alkalbani University of Buraimi.
Information Representation. Digital Hardware Systems Digital Systems Digital vs. Analog Waveforms Analog: values vary over a broad range continuously.
1 DLD Lecture 18 Recap. 2 Recap °Number System/Inter-conversion, Complements °Boolean Algebra °More Logic Functions: NAND, NOR, XOR °Minimization with.
Computer Systems Architecture Copyright © Genetic Computer School 2008 CSA 1- 0 Lesson 1 Number System.
The Hexadecimal Number System and Memory Addressing ISAT 121.
1 Representation of Data within the Computer Oct., 1999(Revised 2001 Oct)
Computer Science Binary. Binary Code Remember the power supply that is inside your computer and how it sends electricity to all of the components? That.
Data Representation Conversion 24/04/2017.
EEL 3801C EEL 3801 Part I Computing Basics. EEL 3801C Data Representation Digital computers are binary in nature. They operate only on 0’s and 1’s. Everything.
Data Representation, Number Systems and Base Conversions
Hexadecimal Data Representation. Objectives  Know how the Hexadecimal counting system works  Be able to convert between denary, binary & hexadecimal.
THE BINARY NUMBER SYSTEM “There are only 10 types of people in this world: Those who understand BINARY and those who do not.”
07/12/ Data Representation Two’s Complement & Binary Arithmetic.
SAK Chapter 21 Chapter 2 : Number System 2.1 Decimal, Binary, Octal and Hexadecimal Numbers 2.2 Relation between binary number system with other.
Irvine, Kip R. Assembly Language for Intel-Based Computers 6/e, Signed Integers The highest bit indicates the sign. 1 = negative, 0 = positive.
Number Systems by Dr. Amin Danial Asham. References  Programmable Controllers- Theory and Implementation, 2nd Edition, L.A. Bryan and E.A. Bryan.
School of Computer and Communication Engineering, UniMAP Mohd ridzuan mohd nor DKT 122/3 - DIGITAL SYSTEM I Chapter.
1 Digital Logic Design Lecture 2 More Number Systems/Complements.
09/03/20161 Information Representation Two’s Complement & Binary Arithmetic.
Number Systems. Topics  The Decimal Number System  The Binary Number System  Converting from Binary to Decimal  Converting from Decimal to Binary.
CS 125 Lecture 3 Martin van Bommel. Overflow In 16-bit two’s complement, what happens if we add =
Numbering Systems and Conversion Understand How Computing Devices Work 1.
Understanding Computers
Binary a. express numbers in binary, binary-coded decimal (BCD), octal and hexadecimal;
CHAPTER 3 BINARY NUMBER SYSTEM. Computers are electronic machines which operate using binary logic. These devices use two different values to represent.
Number Systems. The position of each digit in a weighted number system is assigned a weight based on the base or radix of the system. The radix of decimal.
Advanced Binary b. describe and use two’s complement and sign and magnitude to represent negative integers; c. perform integer binary arithmetic, that.
3.1 Denary, Binary and Hexadecimal Number Systems
CHAPTER 1 : INTRODUCTION
Chapter 3 Data Representation
Number Systems.
Numbering System TODAY AND TOMORROW 11th Edition
Data Representation Conversion 05/12/2018.
COMS 161 Introduction to Computing
(return of the…) Data blast
COMS 161 Introduction to Computing
The basics of any electronic device means either electricity is flowing or it is not i.e. a switch is either on or off Computers are electronic devices.
A-level Computer Science
Abstraction – Number Systems and Data Representation
23/04/2019 Data Representation Conversion.
COMS 161 Introduction to Computing
WJEC GCSE Computer Science
Number systems Converting numbers between binary, octal, decimal, hexadecimal (the easy way)
Chapter 3 - Binary Numbering System
CHAPTER 69 NUMBER SYSTEMS AND CODES
Presentation transcript:

Computing Theory – F453 Number Systems

Data in a computer needs to be represented in a format the computer understands. This does not necessarily mean that this format is easy for us to understand. Not easy, but not impossible! A computer only understand the concept of ON and OFF. Why? How do we translate this into something WE understand? We use a numeric representation (1s and 0s) Data Representation

If a computer can only understand ON and OFF, which is represented by 1 and 0, then which is which? 1 = ON 0 = OFF This is known as the Binary system. Because there are only 2 digits involved, it is known as Base 2. But what does it MEAN??! Data Representation

We use the Denary Number System. This is in Base 10, because there are 10 single digits in our number system. Why? We are surrounded by things that are divisible by ten. Counting in tens is not a new phenomenon… Even the Egyptians did it! Denary Numbers

Yes! The Mayans used the Vigesimal system (Base 20) Nigerians use the Duodecimal system (Base 12) The Babylonians used Base 60!! So…. ‘Base’ means the number of digits available in the system. Denary has 10 individual digits: to make the next number we have to combine two digits: 10 Are there other notations?

Binary Binary can be easily calculated from denary by using the following steps: Let’s try the number Is 42 > 128? Is 42 > 64? Is 42 > 32? = 10 1 Is 10 > 16? Is 10 > 8? = 2 Is 2 > 4? Is 2 > 2? =

Past paper questions are one of the best ways to help you remember the answers when it matters…. Exam Practice!

Markscheme Answer: 699

The Octal system uses Base 8 (denary is Base 10) Which means that Octal numbers are arranged ascending in powers of 8 So how do I get from Denary to Octal??! USE BINARY! is our binary number is split into three (from the right, adding a leading 0) is the Octal 0x8 2 +5x8 1 +2x8 0 = = 42 The 2, 1 & 0 powers relate to the base octal figures in the table above Octal Binary

From the example shown: Octal numbers are creating by taking the sets of three bits from the right of a binary number and creating a leading zero This is then converted into it’s Octal format This can be converted from Octal to Denary by multiplying each digit by 8 to the power of the Octal unit and adding the total value together. Relating Octal to Binary

Hexadecimal is very similar to Octal in that it has a differing base equivalent to denary, you just need the table! Hex, is counted in Base 16, which means it has 16 possible digits before you get into double figures. Where in Octal, you needed 3 binary bits to create all possible 8 digits, in Hex we need 4 binary bits. This is half a binary byte – also known as a nibble Hexadecimal HexidecimalBinary A1010 B1011 C1100 D1101 E1110 F1111

Now trying to convert this into Hexadecimal…. Try This: – 128 = – 64 = – 32 = – 16 = – 8 = 4 4 – 4 = Convert 252 in denary into Binary: First split the byte into two nibbles Now, convert each of the nibbles into their Hexadecimal equivalent 1111 = F 1100 = C So, 252 in denary, must be FC in Hexadecimal!

We have already seen this in action through converting Denary into Octal and Hexadecimal. Binary Coded Decimal (BCD) is the binary equivalent of the decimal digits we use. Think back to your first years in school where you were taught to count in units, tens, and hundreds. This was teaching you the basis of the denary system. BCD takes each of these denary digits and changes them Into their binary equivalent…. Binary Coded Decimal

Use the table below to write out the denary number 3142 in binary coded decimal. BCD can be used to represent large denary numbers. Specifically those larger then 255. Why? Binary Coded Decimal DecimalBinary

Numbers can be represented in a format known as Two’s Complement. Think of a car milometer – It starts at Move forward, and it becomes But what if it moves back? There is no -1?! Instead the clock goes to which represents -1 mile. So, in Two’s complement, we look at the leading number which represents the sign : 1 being negative and 0 being positive. But Some Numbers Are Negative!

A few examples: = -3 why? How? Two’s complement If this is a 1, we change 128 to

= -2 More Examples: = = 82

1. Find the binary value of the equivalent decimal number first 2. Change all the 0’s to 1’s and vice versa 3. Add 1 to the result. OR 1. Starting from the right, leave all the digits alone up to and including the first ‘1’ 2. Now, change all the other digits from 0 to 1 or 1 to 0 Converting Negative Denary into Binary….

Examples! = Starting from the right, leave all the digits alone up to and including the first ‘1’ = Now, change all the other digits from 0 to 1 or 1 to = - 74!

Ok. So how does a computer recognise the alphabet? If a computer can recognise numbers through binary, then we can assign a numeric value to a letter which will allow the computer to recognise it! A character set is a table of Alphabetical (alpha) characters showing their numeric equivalent. There are two major character sets: ASCII – American Standard Code for Information Interchange UNICODE – Universal Codes Enough With The Maths!

ASCII is pronounced ‘as-ski’ It is based on the Latin alphabet, that is, it was originally developed to use the English Language. Historically ASCII was developed for telegraphic printers (think REALLY old fax machines) UNICODE was developed later on to encompass the many different alphabets used across the globe (and now includes the dreaded Wingdings…. And even Klingon!) ASCII / UNICODE Character Sets

Representation Denary (Base 10) Binary (Base 2) Octal (Base 8) Hexadecimal (Base 16) Binary Coded Decimal Sign & Magnitude Two’s Compliment Key Terms: Character Set ASCII Unicode