 Method of representing or encoding numbers  Two main notation types  Sign-value  Roman numerals  Positional (place-value)  Modern decimal notation.

Slides:



Advertisements
Similar presentations
Information Representation
Advertisements

Information Processing Session 5B Binary Arithmetic Slide
Representing Information as Bit Patterns Lecture 4 CSCI 1405, CSCI 1301 Introduction to Computer Science Fall 2009.
Binary Expression Numbers & Text CS 105 Binary Representation At the fundamental hardware level, a modern computer can only distinguish between two values,
Binary and Decimal Numbers
IT-101 Section 001 Lecture #4 Introduction to Information Technology.
Computer Systems 1 Fundamentals of Computing
Number Systems & Logic Gates Day 1
© BYU 02 NUMBERS Page 1 ECEn 224 Binary Number Systems and Codes.
Binary Numbers.
Bits, Bytes, KiloBytes, MegaBytes, GigaBytes & TeraBytes.
Memory Terminology & Data Representation CSCI 1060 Fall 2006.
Chapter 3 Representing Numbers and Text in Binary Information Technology in Theory By Pelin Aksoy and Laura DeNardis.
Numbering Systems CS208.
Chapter 2 Computer Hardware
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 Introduction Chapter 1 n What is Assembly Language? n Data Representation.
Representing Data. Representing data u The basic unit of memory is the bit  A transistor that can hold either high or low voltage  Conceptually, a tiny.
Data Representation and Storage Lecture 5. Representations A number value can be represented in many ways: 5 Five V IIIII Cinq Hold up my hand.
Fill in the blanks: (1) _________ has only two possible values 0 and 1. (2) There are __________bits in a byte. (3) 1 kilobyte of memory space can store.
Chapter 3 Section 1 Number Representation Modern cryptographic methods, unlike the classical methods we just learned, are computer based. Representation.
Text and Graphics September 26, Unit 3.
HOW COMPUTERS MANIPULATE DATA Chapter 1 Coming up: Analog vs. Digital.
Number systems, Operations, and Codes
The Hexadecimal Number System and Memory Addressing ISAT 121.
CS161 Computer Programming Instructor: Maria Sabir Fall 2009 Lecture #1.
CISC1100: Binary Numbers Fall 2014, Dr. Zhang 1. Numeral System 2  A way for expressing numbers, using symbols in a consistent manner.  " 11 " can be.
1 Data Representation Characters, Integers and Real Numbers Binary Number System Octal Number System Hexadecimal Number System Powered by DeSiaMore.
Data Representation Conversion 24/04/2017.
Data Representation, Number Systems and Base Conversions
THE BINARY NUMBER SYSTEM “There are only 10 types of people in this world: Those who understand BINARY and those who do not.”
Binary01.ppt Decimal Decimal: Base 10 means 10 Unique numerical digits ,00010,000 Weight Positions 3,
Chapter 3 The Power of HEX Finding Slivers of Data.
Data Representation. What is data? Data is information that has been translated into a form that is more convenient to process As information take different.
* Numeral Systems: A writing method for expressing numbers is called a “Numeral System". In the most common numeral system, we write numbers with combinations.
Data Representation. How is data stored on a computer? Registers, main memory, etc. consists of grids of transistors Transistors are in one of two states,
ASCII AND EBCDIC CODES By : madam aisha.
Information Coding Schemes Group Member : Yvonne Tiffany Jurifah bt Junaidi Clara Jane George.
Chapter 1 Representing Data in a Computer. 1.1 Binary and Hexadecimal Numbers.
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.
 Method of representing or encoding numbers  Two main notation types  Sign-value  Roman numerals  Positional (place-value)  Modern decimal notation.
A+ Computer Repair Lesson 3: Number System. Objectives Define binary, decimal, octal, and hexadecimal numbering systems. Define binary, decimal, octal,
Understanding Computers
Binary a. express numbers in binary, binary-coded decimal (BCD), octal and hexadecimal;
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.
CC111 Lec#2 The System Unit The System Unit: Processing and Memory Lecture 2 Binary System.
Understanding Binary Understanding Computers. Understanding Computers L3 – Understanding Binary Learning Objectives All will Understand why all data is.
1.4 Representation of data in computer systems Character.
Number Systems & Binary Arithmetic
Some basic concepts underlying computer archi­tecture
Binary Representation in Text
Binary Representation in Text
Understanding binary Understanding Computers.
NUMBER SYSTEMS.
Lec 3: Data Representation
3.1 Denary, Binary and Hexadecimal Number Systems
Information Support and Services
What is Binary? Binary is a two-digit (Base-2) numerical system, which computers use to process and store data. The reason computers use the binary system.
Introduction to IT By: Muhammed s. anwar.
Ch2: Data Representation
Student: Ying Hong Course: Database Security Instructor: Dr. Yang
Information Representation
Digital Electronics and Microprocessors
Chapter 1 Number System RGGP, Narwana.
Chapter Four Data Representation in Computers By Bezawit E.
UNIT – 3 & 4. Data Representation and Internal
Networks & I/O Devices.
Chapter 3 - Binary Numbering System
Presentation transcript:

 Method of representing or encoding numbers  Two main notation types  Sign-value  Roman numerals  Positional (place-value)  Modern decimal notation  Several number systems are commonly used in computing  Decimal  Binary  Hexadecimal  “Shorthand” for binary Digital Data2

 We count in “decimal” or base 10 by powers of 10:  10 0 = 1  10 1 = 10  10 2 = 10*10 = 100  10 3 = 10*10*10 = 1,000  10 6 = 1,000,000  Computers count in “binary” or base 2:  2 0 = 1  2 1 = 2  2 2 = 2*2 = 4  2 3 = 2*2*2 = 8  2 10 = 1,024 Digital Data3

 Bit (b): bi nary digi t -- 0 or 1 value  0 or 1 correspond to the electrical values of off or on, respectively  All computer data is represented in bits  Byte (B): grouping of 8 bits  Considered the basic unit of digital information  8 bits = 1 byte is the de facto standard (also called an octet )  File sizes and network data are measured in bytes  You can’t have a 5-bit file  Physical network media transmit bits, but network protocols are based on bytes  Unit multiples  Kilobyte: 2 10 = 1,024 bytes (≈ 1,000)  Megabyte: 2 20 = 1,048,576 bytes (≈ 1,000,000)  Gigabyte: 2 30 = 1,073,741,824 bytes (≈ 1,000,000,000)  Terabyte: 2 40 = 1,099,511,627,776 bytes (≈ 1,000,000,000,000) Digital Data4

 Decimal  Binary  Hexadecimal Digit Position ( k ) 3210 Weight (b k ) Decimal Weight1, Digit (a k ) 1983 Decimal Value 1, = 1,983 Digit Position ( k ) Weight (b k ) Decimal Weight1, Digit (a k ) Decimal Value 1, = 1,983 Digit Position ( k ) 210 Weight (b k ) Decimal Weight Digit (a k ) 7BF Decimal Value 1, = 1,983 Digital Data5

 Base  Number around which system is organized  Number of symbols used to represent each digit of a number  Digits  Set of symbols used in forming numbers  Additional symbols may be defined for bases > 10  Ex: hexadecimal (see chart at right)  Positional Notation  Position of a digit conveys its significance  Rightmost digit represents the zero- power of the base value  Moving left, each digit represents an increasing power of the base number Number SystemBaseDigits Decimal 100,1,…, 9 Binary 20, 1 Hexadecimal 160, 1,…, 9, A – F Digit Position Number System Decimal , , Binary Hexadecimal , , Digital Data6

 Hexadecimal: A shorthand notation for binary  One hex digit represents 4 binary digits  Hexadecimal numbers are usually prefixed with “0x” to identify number it is a hex value  7BF 16 → 0x7BF Digital Data7 DecimalBinaryHex DecimalBinaryHex A B C D E F

1. Divide the value by the given base x  The remainder will be the least significant (right- most) digit of the base x number 2. Divide the result by the base  The remainder becomes the most significant (left- most) digit of the base x number 3. Repeat step 2 until the result is zero  The remainder is the most significant digit of the base x number Digital Data8

 Convert the decimal value 150 to binary  What decimal value does the bit pattern   Convert the binary pattern  To hex Digital Data9

 Convert 2017 to binary (base 2)  Convert 2017 to hexadecimal (base 16) 7 / 16 =0remainder / 16 =7remainder e (14) 2,017 / 16 =126Remainder 1 Digital Data 10 1 / 2 =0remainder 1 3 / 2 =1remainder 1 7 / 2 =3remainder 1 15 / 2 =7remainder 1 31/ 2 =15remainder 1 63 / 2 =31remainder / 2 =63remainder / 2 =126remainder / 2 =252remainder 0 1,008 / 2 =504remainder 0 2,017 / 2 =1,008remainder 1 Binary Digits Left to Right = = 7e1 16 Hex Digits Left to Right Convert to hex Simple: Break up the Binary number into sets of four bits Look at Binary-Hex chart 7 e 1

 American Standard Code for Information Interchange (ASCII)  Character-encoding scheme based on the ordering of the English alphabet  Maps digital bit pattern and character symbol  Includes  Printable characters  Alphabet, numbers, symbols  Graphics characters  ■ ┌ ┐ ╔ ╗  Control characters  Backspace, tab, line feed, carriage return  Many of these characters are non-printable Digital Data11

Digital Data12

 Strings are a sequence of bytes  Bytes represent ASCII characters  Characters can be represented as  Character value: ‘m’  Decimal value: 109  Binary value:  Hexadecimal value: 6d  Try entering these URLs in a browser    ‘%’ tells the program what follows is a hex value Digital Data13

 A file is a collection of binary data  Format determines the interpretation of bit patterns  Specifies the type of data a file contains  Text, image, sound, Word, Excel, etc.  Example   USA (ASCII text file)  (24-bit bitmap) Digital Data14

 Executable programs are just files  Sequence of bytes  Computers interpret the byte sequence as instructions  Executable file formats  Windows – Portable Executable (PE) format .exe,.dll (libraries),.sys (device drivers)  UNIX – Executable and Linkable Format (ELF)  Also used by UNIX variants  Linux, BSD, Solaris  Mac OS X – Mach object file (Mach-O)  Earlier Mac OSs use Preferred Executable Format (PEF) Digital Data15

 Convention for naming files .  Extension is usually three letters .txt (text),.jpg (JPEG image),.mp3 (MP3 audio),.doc (Word),.xls (Excel)  Can be more or less .c (C source code),.gz (GNU zip),.docx (Word),.xlsx (Excel)  Extension DOES NOT determine bit interpretation  Determined by file format (ie., how file is being viewed)  Operating systems and applications make decisions based on file extension .doc *ought* to be a Word document…I should use Microsoft Word to open it  Extensions can be changed without changing the file format  Example: change.zip to.txt to a ZIP file  Can still open the “.txt” file with a program that recognizes the ZIP file format Digital Data16

 What string is represented by the ASCII values :  What exactly is displayed when we open the file yay.txt in notepad which consists of the following bytes:  What exactly would be displayed in the hex editor Frhed when we open yay.txt? Digital Data17

 Number Systems Decoded detail.asp?wpid=315  RFC 20: ASCII format for Network Interchange  File Signatures Table  Comparison of Executable File Formats able_file_formats Digital Data18