Section 3.1: Number Representation Practice HW (not to hand in) From Barr Text p. 185 # 1-5.

Slides:



Advertisements
Similar presentations
KFUPM COE 202: Digital Logic Design Number Systems Part 3 Courtesy of Dr. Ahmad Almulhem.
Advertisements

Number Systems and Codes
Computer Codes Rohit Khokher. Computer Codes Data types NumericNonnumeric IntegerRealAlphabet A, B, C, …,Z a, b, c,…,z Digits 0,…,9 Special Characters.
How Computers Represent Numbers Friday, Week 5. Binary Code A series of 1’s and 0’s Place value is in powers of 2.
Representing Information as Bit Patterns Lecture 4 CSCI 1405, CSCI 1301 Introduction to Computer Science Fall 2009.
Representation of Data How is data (numbers, characters) represented so that it can be used in a Computer ?
Data Representation (in computer system) Computer Fundamental CIM2460 Bavy LI.
Binary Numbers.
Data Storage. SIGN AND MAGNITUDE Storing and representing numbers.
Bits and Bytes.
CODING SYSTEMS CODING SYSTEMS CODING SYSTEMS. CHARACTERS CHARACTERS digits: 0 – 9 (numeric characters) letters: alphabetic characters punctuation marks:
2.1.4 BINARY ASCII CHARACTER SETS A451: COMPUTER SYSTEMS AND PROGRAMMING.
1.6 Signed Binary Numbers.
Management Information Systems Lection 06 Archiving information CLARK UNIVERSITY College of Professional and Continuing Education (COPACE)
Bits, Bytes, KiloBytes, MegaBytes, GigaBytes & TeraBytes.
Representing text Each of different symbol on the text (alphabet letter) is assigned a unique bit patterns the text is then representing as.
Binary Numbers and ASCII and EDCDIC Mrs. Cueni. Data Representation  Human speech is analog because it uses continuous signals (waves) that vary in strength.
Aloha Aloha What you see: What the computer sees: binary number columns binary number columns
Chapter 1 Data Storage(2) Yonsei University 1 st Semester, 2014 Sanghyun Park.
Data Representation S2. This unit covers how the computer represents- Numbers Text Graphics Control.
EX_01.1/46 Numeric Systems. EX_01.2/46 Overview Numeric systems – general, Binary numbers, Octal numbers, Hexadecimal system, Data units, ASCII code,
Binary Code.
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.
COMPSCI 210 Semester Tutorial 1
Chapter 3 Section 1 Number Representation Modern cryptographic methods, unlike the classical methods we just learned, are computer based. Representation.
Section 2.7: The Friedman and Kasiski Tests Practice HW (not to hand in) From Barr Text p. 1-4, 8.
Section 4.4: The RSA Cryptosystem Practice HW Handwritten and Maple Exercises p at end of class notes.
Number Bases and Representation. Denary Number System (Base 10) Our number system uses 10 digits (0-9) As you move from right to left each number is worth.
Binary System Presented by Mr. Wilhelmi Internal Representation of Data Input Input  Data that is put into the computer for processing Data Data  The.
CS 111 – Sept. 1 Intro to data representation Binary numbers –Convert binary  decimal –Convert decimal  binary Text –ASCII and Unicode Commitment: –For.
Agenda Character representation Numerical Conversions ASCII EBCDIC
Chapter 7 C supports two fundamentally different kinds of numeric types: (a) integer types - whole numbers (1) signed (2) unsigned (b) floating types –
Communicationcommunication Created by- Upendra Sharma.
Information Coding Schemes Group Member : Yvonne Tiffany Jurifah bt Junaidi Clara Jane George.
HNC COMPUTING - COMPUTER PLATFORMS 1 Micro Teach Binary.
Remarks on Fast Exp (4/2) How do we measure how fast any algorithm is? Definition. The complexity of an algorithm is a measure of the approximate number.
Nguyen Le CS147.  2.4 Signed Integer Representation  – Signed Magnitude  – Complement Systems  – Unsigned Versus Signed Numbers.
A+ Computer Repair Lesson 3: Number System. Objectives Define binary, decimal, octal, and hexadecimal numbering systems. Define binary, decimal, octal,
Lesson 6 Binary Understand what Binary Code means and apply this knowledge Understand how data is represented using bit systems and be able to change decimal.
Understanding Computers
Binary a. express numbers in binary, binary-coded decimal (BCD), octal and hexadecimal;
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.
Lecture Coding Schemes. Representing Data English language uses 26 symbols to represent an idea Different sets of bit patterns have been designed to represent.
Nat 4/5 Computing Science Data Representation Lesson 3: Storing Text
Programmable Logic Controller
Some basic concepts underlying computer archi­tecture
Understanding binary Understanding Computers.
Unit 2.6 Data Representation Lesson 2 ‒ Characters
Number Systems and Codes
From the ASCII table… Symbol Decimal Binary A B 66
Binary 1 Basic conversions.
Unit 18: Computational Thinking
CSCI 198: Lecture 4: Data Representation
Data Transfer ASCII FILES.
CSCI 161: Lecture 4: Data Representation
RFID - EN Encoding information Encoding information J.-D. Chatelain.
Data Encoding Characters.
Number Systems and Codes
Numbering System TODAY AND TOMORROW 11th Edition
Presenting information as bit patterns
COMS 161 Introduction to Computing
COMS 161 Introduction to Computing
How Computers Store Data
The Binary System.
Learning Intention I will learn how computers store text.
FIGURE 1-1 Examples of Voltage Ranges and Waveforms for Binary Signals
C Programming Language
Chapter 3 - Binary Numbering System
Presentation transcript:

Section 3.1: Number Representation Practice HW (not to hand in) From Barr Text p. 185 # 1-5

Representation of Numbers Ordinary numbers we see every day are represented as base 10, that is, as the sum of the powers of 10. We illustrate how this is so in the following example.

So far, we have studied historical cryptographic methods that are typically hand-based. Modern cryptographic methods are computer based methods. To have an appreciation for these methods, we need to understand how computers communicate. In this section, we study the types of numbers that computers typically work with.

Example 1: Write the number as a sum of the powers of 10. Solution:

Binary Numbers are base 2 numbers are made up only of 0’s and 1’s. Computers use these numbers to represent data internally. Examples of binary numbers are 0 (which represents the number 0) 100 (which represents the number 4), 1001 (which represents the number 9), and (which represents the number 88). We now give a formal definition of a binary number.

Definition A binary number, where, represents the base 10 decimal number given by We illustrate this definition in the following examples.

Example 2: Find the base 10 decimal representation of the binary numbers a.100 Solution:

b Solution:

c Solution:

Note To convert a decimal (base 10) number to binary, we compute the powers of 2 (starting with ) that are less than the given number. Then write the number as a sum of these powers of 2 from largest to smallest, writing a coefficient of 1 in front the power of 2 that occurs in the sum and a 0 in front of the power of 2 that does not occur. Reading off the coefficients from left to right gives the binary representation. We illustrate this technique in the following examples.

Example 3: Convert 77 to binary. Solution:

Example 4: Convert 320 to binary. Solution:

Approximating the Size of a Binary Number Many times the strength of a cryptographic method is expressed in terms of the size of a particular parameter. Many times the size of this parameter is expressed in terms on the number of binary digits the number has. The following formula gives an estimate of the number of binary digits is required to expressed a given base 10 decimal number.

Number of Binary Digits Estimate where

Example 5: Approximate how many binary digits are used to represent the number Solution:

The following inequality gives a bound of the size of a base 10 number given the number of binary digits that represent it. Base 10 Number Size Binary Bound Estimate, where

Example 6: A base 10 number is represented by a 32 bit number. Find a bound that will estimate its size. Solution:

ASCII Codes for Characters So far, we have used the MOD 26 alphabet assignment table to assign a numerical representation to each letter. Computers normally use the ASCII (American Standard Code for Information Interchange) table for obtaining numerical representation of characters.

Table 1: ASCII table for characters

Example 7: Find the numerical Ascii table representation for the characters z, Z, “, and a space. Solution:

Example 8: Decode the following text represented by the 8-bit blocks representing Ascii code numbers: Solution: