Number systems. Binary system. Bits and bytes. Modern computers “speak” in a digital language composed of 2 digits. The machine language of modern computers.

Slides:



Advertisements
Similar presentations
Introduction to Computers Part II
Advertisements

Base 10 Denary Decimal
Binary number, Bits and Bytes and memory Sen Zhang.
Binary Expression Numbers & Text CS 105 Binary Representation At the fundamental hardware level, a modern computer can only distinguish between two values,
assumes basic arithmetic
Binary and Decimal Numbers
Computer Systems 1 Fundamentals of Computing
Binary Numbers.
CREATED BY, MS. JENNIFER DUKE BITS, BYTES, AND UNITS OF MEASUREMENT.
Bits, Bytes, KiloBytes, MegaBytes, GigaBytes & TeraBytes.
P.2 Exponents and Scientific Notation
Data Representation Number Systems.
Aug CMSC 104, LECT-021 Machine Architecture and Number Systems Some material in this presentation is borrowed form Adrian Ilie From The UNIVERSITY.
Memory Terminology & Data Representation CSCI 1060 Fall 2006.
Higher Computing Data Representation.
Lecture for Week Spring.  Numbers can be represented in many ways. We are familiar with the decimal system since it is most widely used in everyday.
Numbering systems.
1 Machine Architecture and Number Systems Topics Major Computer Components Bits, Bytes, and Words The Decimal Number System The Binary Number System Converting.
IT-101 Section 001 Lecture #3 Introduction to Information Technology.
Data Representation Int 2 Computing Unit 1 – Computer Systems St Kentigern’s Academy.
Copyright © 2003 by Prentice Hall Module 5 Central Processing Unit 1. Binary representation of data 2. The components of the CPU 3. CPU and Instruction.
Hardware Data Storage.
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.
Machine Architecture CMSC 104, Section 4 Richard Chang 1.
Introduction to Pharmaceutical Calculation
1 Data Representation Characters, Integers and Real Numbers Binary Number System Octal Number System Hexadecimal Number System Powered by DeSiaMore.
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.
How a Computer Processes Information. Java – Numbering Systems OBJECTIVE - Introduction to Numbering Systems and their relation to Computer Problems Review.
Computer Math CPS120 Introduction to Computer Science Lecture 4.
CS101 Learning Binary Learning Binary What do you think when you see One hundred and one What does a computer think when it sees 101? 5.
Binary A double zero educational presentation. Binary Basics Binary is the language computers use Only 1’s and 0’s can be found in Binary Very large numbers.
Computer Programming 12 Mr. Jean February 5 th, 2014.
BASIC OPERATIONS The four basic mathematical operations are: + Addition - - Subtraction × Multiplication ÷ Division.
Introduction To Number Systems Binary System M. AL-Towaileb1.
Basic Computer Organization Rashedul Hasan.. Five basic operation No matter what shape, size, cost and speed of computer we are talking about, all computer.
Scientific Notation. Scientific (Exponential) Notation A number is written as the product of two numbers, a coefficient and 10 raised to a power 36,000.
2.1.4 Data Representation Units.
* Numeral Systems: A writing method for expressing numbers is called a “Numeral System". In the most common numeral system, we write numbers with combinations.
Binary Decimal Hexadecimal
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.
Computer Math CPS120 Introduction to Computer Science Lecture 7.
 Computers are 2-state devices › Pulse – No pulse › On – Off  Represented by › 1 – 0  BINARY.
Number Systems & Binary How to count. How do we represent numbers? Early systems: – Actual count : ||||| = 5 – Roman numers : XI = 11 Hard to do math:
Binary Numbers. Base 10 and Base 2  We normally work with numbers in base 10.  In base 10 we use the digits 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9.  Everything.
CC111 Lec#2 The System Unit The System Unit: Processing and Memory Lecture 2 Binary System.
 Human language : commonly used to express feeling and understand what other people expression.  Computer language : are a languages by which a user.
Math Review Do you remember, from math class, how exponentiation operations are typically represented? an a is known as the "base" n is known as the "exponent".
Binary & Hex Review.
Introduction To Number Systems
Computer basics.
© 2003, Cisco Systems, Inc. All rights reserved.
Consider this number: , Ones (7 ones) Tens (no tens)
3.1 Denary, Binary and Hexadecimal Number Systems
Numerical Representation
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.
Unit 2.6 Data Representation Lesson 1 ‒ Numbers
Writer:-Rashedul Hasan. Editor:- Jasim Uddin
Number Systems & Binary
Number System conversions
इंट्रस्टिंग बनने के लिए आपको इंट्रस्टेड होना पड़ेगा।
How do computers work? Storage.
Fundamentals of Data Representation
CS101 Learning Binary Learning Binary.
Numerical Representation
Chapter Four Data Representation in Computers By Bezawit E.
Binary System.
Information Technology Department
5.1 - Scientific Notation & Units
Binary & Hex Review.
Basic Computer Organization
Presentation transcript:

Number systems. Binary system. Bits and bytes

Modern computers “speak” in a digital language composed of 2 digits. The machine language of modern computers is written in Binary Code. A BIT is short for Binary Digit. İf n = number of digits, the number of potential values 2^(n-1) 1 bit can represent up to 2 values

1 bit = 0, 1 1 bit 1 bit = can represent 4 values 0,1,2,3 3 bits can represent 8 possible values 2^3 = 8 0,1,2,3,4,5,6,7 A single bit can only hold 2 values, but the number of values increases exponentially with every digit you add

2^x10^x 0000 * (2^0)0 0011*(2^0)1 0101*(2^1)+0*(2^0)2 0111*(2^1)+1*(2^0)3 1001*(2^1)+0*(2^0)+0*(2^0)4 1011*(2^1)+0*(2^0)+1*(2^0)5 1101*(2^1)+1*(2^0) )+0*(2^0)6

DecimalBinaryOctalBinaryHexadecimal a b c d e f a e

The binary (base two) numeral system has two possible values, often represented as 0 or 1, for each place-value. In contrast, the decimal (base ten) numeral system has ten possible values (0,1,2,3,4,5,6,7,8, or 9) for each place-value. To avoid confusion while using different numeral systems, the base of each individual number may be specified by writing it as a subscript of the number. For example, the binary number may be specified as "base two" by writing it as The decimal number 156 may be written as and read as "one hundred fifty-six, base ten". Base 2 Numbering System

Computers recognize and process data using the binary, or base 2, numbering system. The binary numbering system uses only two symbols (0 and 1) instead of the ten symbols in the decimal numbering system. The position, or place, of each digit represents the number 2 (the base number) raised to the power (exponent), based on its position. Examples 2º = 1 2¹ = 2 2² = 4 2³ = = = = = 128

1 BYTE = 8 Bit 1 Bit can represent 0 or 1. 1 BYTE 1 character 1024 BYTE = 1 KiloByte (KiloByte = KB) 1024 KB = 1 MegaByte (MegaByte = MB) 1024 MB = 1 GigaByte (GigaByte = GB) 1024 GB = 1 TeraByte (TeraByte = TB) You might hear an advertisement that says, "This computer has a 32-bit Pentium processor with 64 megabytes of RAM and 2.1 gigabytes of hard disk space"

Converting From Binary to Decimal Numbers The positional value concept is simple: With both binary and decimal numbers, the actual value of each digit depends on its position (how "far to the left") within the number. For example, in the decimal number 124, the digit '4' represents the value "four," but the digit '2' represents the value "twenty," not "two." The '2' represents a larger value than the '4' in this case because it lies further to the left in the number. Likewise in the binary number , the rightmost '1' represents the value "one," but the leftmost '1' represents a much higher value ("sixty-four" in this case). In mathematics, the base of the numbering system determines how much to value digits by position. For base-ten decimal numbers, multiply each digit on the left by a progressive factor of 10 to calculate its value. For base-two binary numbers, multiply each digit on the left by a progressive factor of 2. Calculations always work from right to left.

In the above example, the decimal number 123 works out to: 3 + (10 * 2) + (10*10 * 1) = 123 and the binary number converts to decimal as: 1 + (2 * 1) + (2*2 * 0) + (4*2 * 1) + (8*2 * 1)+ (16*2 * 1) + (32*2 * 1) = 123 Therefore, the binary number is equal to the decimal number 123.

Converting From Decimal to Binary Numbers To convert numbers in the opposite direction, from decimal to binary, requires successive division rather than progressive multiplication. To manually convert from a decimal to a binary number, start with the decimal number and begin dividing by the binary number base (base "two"). For each step the division results in a remainder of 1, use '1' in that position of the binary number. When the division results in a remainder of 0 instead, use '0' in that position. Stop when the division results in a value of 0. The resulting binary numbers are ordered from right to left.

For example, the decimal number 109 converts to binary as follows: 109 / 2 = 54 remainder 1 54 / 2 = 27 remainder 0 27 / 2 = 13 remainder 1 13 / 2 = 6 remainder 1 6 / 2 = 3 remainder 0 3 / 2 = 1 remainder 1 1 / 2 = 0 remainder 1 Therefore the decimal number 109 equals the binary number

In the example below, the decimal number, 253, is converted into a binary number with a remainder, r, by successive division by 2. The binary number for 253 is /2 = 126 r 1 126/2 = 63 r 0 63/2 = 31 r 1 31/2 = 15 r 1 15/2 = 7 r 1 7/2 = 3 r 1 3/2 = 1 r 1 1/2 = 0 r 1

Procedure to Converting a Decimal Number to a Binary Number There are about five steps involved in converting the number 35 to a binary number. 1. First you need to determine the greater power of 2 that is less than or equal to 35. So, starting with the largest number, 2 to the 5 (32) is smaller than 35. Place a "1" in that column and, then, calculate how much is left over by subtracting 32 from 35. The result is Next, you'll want to check to see if 16 (the next lower power of 2) that fits into 3. Because it does not, an "0" is placed in that column. The value of the next number is 8, which is larger than 3, so an "0" is placed in that column too. 3. The next value that we'll work with is 4, which is still larger than 3. So, again, we'll make this a "0." 4. Okay, our next value will be 2, which is smaller than 3. And, because it is, we'll place a "1" into the column. Now, you'll need to subtract 2 from 3, and the result will be The value of the last number is 1, which still works with the remaining number. Therefore, we'll place a "1" in the last column. Now we see that the binary number for the decimal number 35 is

Example 1 Decimal to Binary Conversion

Example 2 Decimal to Binary Conversion