Some basic concepts underlying computer archi­tecture

Slides:



Advertisements
Similar presentations
DATA REPRESENTATION CONVERSION.
Advertisements

How Computers Represent Numbers Friday, Week 5. Binary Code A series of 1’s and 0’s Place value is in powers of 2.
How Computers Represent Numbers Friday, Week 5. Binary Code A series of 1’s and 0’s Place value is in powers of 2.
Chapter Chapter Goals Know the different types of numbers Describe positional notation.
Data Representation in Computers
Number Systems and Arithmetic
Binary Numbers.
Data Representation in Computers. Data Representation in Computers/Session 3 / 2 of 33 Number systems  The additive approach – Number earlier consisted.
Hexadecimal and ASCII Lesson Objective: Understand the purpose of ASCII and how to use it. Lesson Outcome: Convert between Hexadecimal and ASCII Convert.
Digital Logic Chapter 2 Number Conversions Digital Systems by Tocci.
Binary and Hexadecimal Numbers
Number Systems and Codes
Number Systems.
Simple Data Type Representation and conversion of numbers
Binary Numbers and ASCII and EDCDIC Mrs. Cueni. Data Representation  Human speech is analog because it uses continuous signals (waves) that vary in strength.
Numbering Systems CS208.
1 Digital Technology and Computer Fundamentals Chapter 1 Data Representation and Numbering Systems.
EX_01.1/46 Numeric Systems. EX_01.2/46 Overview Numeric systems – general, Binary numbers, Octal numbers, Hexadecimal system, Data units, ASCII code,
NUMBER SYSTEM AND COMPUTER CODES Chapter 2. Prelude Fingers, sticks, and other things for counting were not enough! Counting large numbers Count in groups.
Number Systems Spring Semester 2013Programming and Data Structure1.
Chapter 3 Section 1 Number Representation Modern cryptographic methods, unlike the classical methods we just learned, are computer based. Representation.
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:
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.
Binary01.ppt Decimal Decimal: Base 10 means 10 Unique numerical digits ,00010,000 Weight Positions 3,
Agenda Character representation Numerical Conversions ASCII EBCDIC
Digital Fundamentals Tenth Edition Floyd Chapter 2 © 2008 Pearson Education.
School of Computer and Communication Engineering, UniMAP Mohd ridzuan mohd nor DKT 122/3 - DIGITAL SYSTEM I Chapter.
Number Representation Lecture Topics How are numeric data items actually stored in computer memory? How much space (memory locations) is.
AGBell – EECT by Andrew G. Bell (260) Lecture 2.
Chapter 1 Representing Data in a Computer. 1.1 Binary and Hexadecimal Numbers.
Number Systems. Topics  The Decimal Number System  The Binary Number System  Converting from Binary to Decimal  Converting from Decimal to Binary.
Hexadecimal (base 16) BY MAT D. What is hexadecimal  Hexadecimal is a number system like binary or denary that has 16 characters, the numbers 0-9 and.
Cis303a_chapt03_exam1_answer.ppt CIS303A: System Architecture Exam 1: Chapter 3 Answer List the characters (digits) for the following bases. 1) Decimal:
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.
Number Systems. ASCII – American Standard Code for Information Interchange – Standard encoding scheme used to represent characters in binary format on.
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.
Programmable Logic Controller
Digital Design Chapter One Digital Systems and Binary Numbers
Binary 1 Basic conversions.
Binary Numbers and ASCII and EDCDIC
Octal to Decimal Decimal Octal Binary Hexadecimal.
Number Representation
3.1 Denary, Binary and Hexadecimal Number Systems
CSCI 198: Lecture 4: Data Representation
CHAPTER 1 : INTRODUCTION
Introduction to Chapter 2
CSCI 161: Lecture 4: Data Representation
Introduction The term digital is derived from the way computers perform operation, by counting digits. Application of digital technology: television, communication.
Convert Decimal to Binary
Chapter 3 Data Representation
Number Systems.
University of Gujrat Department of Computer Science
2 Number Systems and Codes Edited by Jerry Bernardini.
Number Systems and Binary Arithmetic
MMNSS COLLEGE,KOTTIYAM DEPARTMENT OF PHYSICS
Numbering System TODAY AND TOMORROW 11th Edition
Digital Electronics and Microprocessors
COMS 161 Introduction to Computing
Number Systems Lecture 2.
COMS 161 Introduction to Computing
2’s Complement form 1’s complement form 2’s complement form
Chapter Four Data Representation in Computers By Bezawit E.
Binary to Decimal Conversion
COMS 161 Introduction to Computing
Digital Representation of Data
Presentation transcript:

Some basic concepts underlying computer archi­tecture Hoda Roodaki hroodaki@kntu.ac.ir

Some basic concepts underlying computer archi­tecture NUMBERING AND CODING SYSTEMS Decimal and binary number systems Converting from decimal to binary Converting from binary to decimal Hexadecimal system Converting between binary and Hex Converting from decimal to hex Converting from hex to decimal Addition of binary and hex numbers 2's complement Addition and subtraction of hex numbers ASCII code

Decimal and binary number systems The binary sys­tem is used in computers because 1 and 0 represent the two voltage levels of on and off. Whereas in base 10 there are 10 distinct symbols, 0, 1, 2, ... , 9, in base 2 there are only two, 0 and 1, with which to generate numbers. Base 10 contains dig­its 0 through 9; binary contains digits 0 and 1 only. These two binary digits, 0 and 1, are commonly referred to as bits.

Converting from decimal to binary One method of converting from decimal to binary is to divide the decimal number by 2 repeatedly, keeping track of the remainders. This process continues until the quotient becomes zero. The remainders are then written in reverse order to obtain the binary number.

Converting from binary to decimal To convert from binary to decimal, it is important to understand the concept of weight associated with each digit position.

Hexadecimal system Base 16, or the hexadecimal system as it is called in computer literature, is used as a convenient representation of binary numbers. The binary system has 2 digits, 0 and 1. The base 10 system has 10 digits, 0 through 9. The hexadecimal (base 16) system has 16 digits. In base 16, the first 10 digits, 0 to 9, are the same as in decimal, and for the remaining six digits, the letters A, B, C, D, E, and F are used.

Hexadecimal system

Converting between binary and hex To represent a binary number as its equivalent hexadecimal number, start from the right and group 4 bits at a time, replacing each 4-bit binary number with its hex equivalent.

Converting from decimal to hex Converting from decimal to hex could be approached in two ways: Convert to binary first and then convert to hex. Convert directly from decimal to hex by repeated division, keeping track of the remainders.

Converting from hex to decimal Conversion from hex to decimal can also be approached in two ways: Convert from hex to binary and then to decimal. Example 0-7 demonstrates this method of converting from hex to decimal. Convert directly from hex to decimal by summing the weight of all digits

Converting from hex to decimal

Addition of binary and hex numbers

2's complement To get the 2 's complement of a binary number, invert all the bits and then add 1 to the result. Inverting the bits is simply a matter of changing all 0s to 1s and 1s to 0s. This is called the 1 s complement.

Subtraction of hex numbers

ASCII code Because all informa­tion in the computer must be represent­ed by 0s and 1s, binary patterns must be assigned to letters and other characters. In the 1960s a standard representation called ASCII (American Standard Code for Information Interchange) was established. The ASCII code assigns binary patterns for numbers 0 to 9, all the letters of the English alphabet, both uppercase (capital) and lower­case, and many control codes and punctuation marks. The great advantage of this system is that it is used by most computers, so that information can be shared among computers. The ASCII system uses a total of 7 bits to represent each code.