How do computers represent data?

Size: px
Start display at page:

Download "How do computers represent data?"

Transcription

1 Data Representation How do computers represent data? 1

2 Data and Computers Computers are multimedia devices,dealing with a vast array of information categories Computers store, present, and help us modify Numbers Text Audio Images and graphics Video 2

3 Analog and Digital Information Computers are finite! How do we represent an infinite it world? We represent enough of the world to satisfy our computational needs and our senses of sight and sound 3

4 Analog and Digital Information Information can be represented in one of two ways: analog or digital Analog data A continuous representation, analogous to the actual information it represents Digital data A discrete representation, breaking the information up into separate elements 4

5 Analog and Digital Information Thermometer is an analog device A mercury thermometer continually rises in direct proportion to the temperature 5

6 Analog and Digital Information Computers cannot work well with analog data, so we digitize the data Digitizeiti Breaking data into pieces and representing those pieces separately Why do we use binary to represent digitized data? 6

7 Electronic Signals Important facts about electronic signals An analog signal continually fluctuates in voltage up and down A digital signal has only a high or low state, corresponding to the two binary digits All electronic signals (both analog and digital) degrade as they move down a line The voltage of the signal fluctuates due to environmental effects 7

8 Electronic Signals (Cont d) Periodically, a digital signal is reclocked to regain its original shape An analog signal and a digital signal Degradation of analog and digital signals 8

9 Binary Numbers Each binary digit (called bit) is either 1 or 0 Bits have no inherent meaning, can represent Unsigned and signed integers Characters Floating-point numbers Most Significant Bit Least Significant Bit Images, sound, etc. Bit Numbering Least significant bit (LSB) is rightmost (bit 0) Most significant bit (MSB) is leftmost (bit 7 in an 8-bit number)

10 Binary Representations One bit can be either 0 or 1 One bit can represent two things (Why?) Two bits can represent four things (Why?) How many things can three bits represent? How many things can four bits represent? How many things can eight bits represent? 10

11 Binary Representations Counting with binary bits 11

12 Binary Representations How many things can bits represent? Why? What happens every time you increase the number of bits by one? 12

13 Binary Representations A bit (Binary digit) is the most basic unit of information in a computer. It is a state t of on or off in a digital it circuit. it Sometimes these states are high or low voltage instead of on or off.. A byte is a group of eight bits. A byte is the smallest possible addressable (can be found via its location) unit of computer storage. A word is a contiguous group of bytes. Words can be any number of bits (16, 32, 64 bits are common). A group of four bits is called a nibble (or nybble). Bytes, therefore, consist of two nibbles: a high-order nibble, and a low-order nibble.

14 Converting Binary to Decimal Each bit represents a power of 2 Every binary number is a sum of powers of 2 Decimal Value = (d n-1 2 n-1 ) (d ) + (d ) Binary ( ) 2 = = Some common powers of 2

15 Questions 1. Convert the following binary numbers to decimal

16 Questions 1. Convert the following binary numbers to decimal

17 Convert Unsigned Decimal to Binary Repeatedly divide the decimal integer by 2 Each remainder is a binary digit in the translated value least significant ifi bit 37 = (100101) 2 most significant bit stop when quotient is zero

18 Decimal -> Binary Questions 2. Convert the following decimal numbers to binary:

19 Decimal -> Binary Questions 2. Convert the following decimal numbers to binary:

20 Hexadecimal Integers 16 Hexadecimal Digits: 0 9, A F More convenient to use than binary numbers Binary, Decimal, and Hexadecimal Equivalents

21 Converting Binary to Hexadecimal Each hexadecimal digit corresponds to 4 binary bits Example: Convert the 32-bit binary number to hexadecimal Solution: E B 1 6 A

22 Converting Hexadecimal to Decimal Multiply each digit by its corresponding power of 16 Value = (d n-1 16 n-1 ) + (d n-2 16 n-2 ) (d 1 16) + d 0 Examples: (1234) 16 = ( ) + ( ) + (3 16) + 4 = Decimal Value 4660 (3BA4) 16 = ( ) + ( ) + (10 16) + 4 = Decimal Value 15268

23 Converting Decimal to Hexadecimal Repeatedly divide the decimal integer by 16 Each remainder is a hex digit in the translated value least significant digit most significant digit stop when quotient is zero Decimal 422 = 1A6 hexadecimal

24 Integer Storage Sizes Half Word Byte 8 16 Storage Sizes Word 32 Double Word 64 Storage Type Unsigned Range Powers of 2 Byte 0 to to (2 8 1) Half Word 0 to 65,535 0 to (2 16 1) Word 0 to 4,294,967,295 0 to (2 32 1) Double Word 0 to 18,446,744,073,709,551, t to (2 64 1) What is the largest 20-bit unsigned integer? Answer: = 1,048,575

25 0 + 0 = = = = 0 (carry 1) Binary Arithmetic Rules = 1 (carry 1) 25

26 Binary Addition Start with the least significant bit (rightmost bit) Add each pair of bits Include the carry in the addition, if present carry (54) (29) (83) bit position:

27 Hexadecimal Addition Start with the least significant hexadecimal digits Let Sum = summation of two hex digits If Sum is greater than or equal to 16 Sum = Sum 16 and Carry = 1 Example: carry: 1 1 C A A F C D A + B = = E 8 4 B Since Sum = = 5 Carry = B 5

28 Representing Negative Values Signed-magnitude number representation The sign represents the ordering, and the digits represent the magnitude of the number 28

29 Signed Magnitude Representation Unsigned: - and + are the same. In signed magnitude the left-most bit represents the sign of the integer. 0for positive numbers. 1for negative numbers. The remaining bits represent to magnitude of the numbers. 29

30 Example Suppose is a signed magnitude representation. The sign bit is 1, then the number represented is negative position Bit pattern contribution The magnitude is with a value = 29 Then the number represented by is 29.

31 Exercise has in signed magnitude notation. Find the signed magnitude of 37 10? 2. Using the signed magnitude notation find the 8-bit binary representation of the decimal value and Find the signed magnitude of 63 using 8-bit binary g g g y sequence?

32 Exercise has in signed magnitude notation. Find the signed magnitude of 37 10? Using the signed magnitude notation find the 8-bit binary representation of the decimal value and Find the signed magnitude of 63 using 8-bit binary 3. Find the signed magnitude of 63 using 8-bit binary sequence

33 Signed-Summary In signed magnitude notation, The most significant bit is used to represent the sign. 1 represents negative numbers 0 represents positive numbers. The unsigned value of the remaining bits represent The magnitude. Advantages: Represents positive and negative numbers Disadvantages: two representations of zero, Arithmetic operations are difficult. 33

34 Excess Notation In excess notation: The value represented is the unsigned value with a fixed value subtracted from it. For n-bit binary sequences the value subtracted fixed value is 2 (n-1). Most significant bit: 0for negative numbers 1 for positive numbers 34

35 Excess Notation with n bits represent 2 n-1 is the decimal value in unsigned notation. Decimal value In unsigned notation -2 n-1 = Decimal value In excess notation Therefore, in excess notation: will represent 0. 35

36 Example (1) - excess to decimal Find the decimal number represented by in excess notation. Unsigned value = = = Excess value: excess value = = =

37 Example (2) - decimal to excess Represent the decimal value 24 in 8-bit excess notation. We first add, 2 8-1, the fixed value = = 152 then, find the unsigned value of = (unsigned notation) = (excess notation) 37

38 example (3) Represent the decimal value -24 in 8-bit excess notation. We first add, 2 8-1, the fixed value = = 104 then, find the unsigned value of = (unsigned notation) = (excess notation) 38

39 Example (4) (10101) Unsigned = = The value represented in unsigned notation ti is 21 Sign Magnitude The sign bit is 1, so the sign is negative The magnitude is the unsigned value = 5 10 So the value represented in signed magnitude is Excess notation As an unsigned binary integer = subtracting = 2 4 = 16, we get = So the value represented in excess notation is

40 Advantages of Excess Notation It can represent positive and negative integers. There is only one representation for 0. It is easy to compare two numbers. When comparing the bits can be treated as unsigned integers. Excess notation is not normally used to represent integers. It is mainly used in floating point representation for representing fractions (later floating point rep.). 40

41 Excess notation - Summary In excess notation, the value represented is the unsigned value with a fixed value subtracted from it. ie i.e. fornbit n-bit binary sequences the value subtracted is 2 (n-1). Most significant bit: 0 for negative numbers. 1 positive numbers. Advantages: Only one representation of zero. Easy for comparison. 41

42 Representing Negative Values Two s Complement (Vertical line is easier to read) = =

43 Representing Negative Values Addition and subtraction are the same as in 10 s complement arithmetic Do you notice something interesting about the left-most bit? 43

44 Forming the Two's Complement starting value = +36 step1: reverse the bits (1's complement) step 2: add 1 to the value from step sum = 2's complement representation = -36 Sum of an integer and its 2's complement must be zero: = (8-bit sum) Ignore Carry Another way to obtain the 2's complement: Start at the least significant 1 Leave all the 0s to its right unchanged Complement all the bits to its left Binary Value = 's Complement = least significant 1

45 Advantages of Two s Complement Notation It is easy to add two numbers Subtraction can be easily performed. Multiplication is just a repeated addition. Division is just a repeated subtraction Two s complement is widely used in ALU

46 Highest bit indicates the sign 1 = negative Sign bit Sign Bit 0 = positive Negative Positive For Hexadecimal Numbers, check most significant digit If highest digit is > 7, then value is negative Examples: 8A and C5 are negative bytes B1C42A00 is a negative word (32-bit signed integer)

47 Binary Subtraction When subtracting A B, convert B to its 2's complement Add A to ( B) borrow: carry: (2's complement) (same result) Final carry is ignored, because Negative number is sign-extended with 1's You can imagine infinite 1's to the left of a negative number Adding the carry to the extended 1's produces extended zeros

48 Ranges of Signed Integers For n-bit signed integers: Range is -2 n 1 to (2 n 1 1) Positive range: 0 to 2 n 1 1 Negative range: -2 n 1 to -1 Storage Type Unsigned Range Powers of 2 Byte 128 to to (2 7 1) Half Word 32,768 to +32, to (2 15 1) Word 2,147,483,648 to +2,147,483, to (2 31 1) Double Word 9,223,372,036,854,775,808 to +9,223,372,036,854,775, to (2 63 1) Practice: What is the range of signed values that may be stored in 20 bits?

49 Exercise Determine the decimal value represented by in each of the following four systems. 1. Unsigned notation? 2. Signed magnitude notation? 3. Excess notation? 4. Tow s complements? 49

50 Number Overflow What happens if the computed value won't fit? Overflow If each value is stored using eight bits, adding 127 to 3 overflows Problems occur when mapping an infinite world onto a finite machine! 50

51 Carry and Overflow Carry is important when Adding or subtracting unsigned integers Indicates that the unsigned sum is out of range Either < 0 or >maximum unsigned n-bit value Overflow is important when Adding or subtracting signed integers Indicates that the signed sum is out of range Overflow occurs when Adding two positive numbers and the sum is negative Adding two negative numbers and the sum is positive Can happen because of the fixed number of sum bits

52 Carry and Overflow Examples We can have carry without overflow and vice-versa Four cases are possible (Examples are 8-bit numbers) (-8) Carry = 0 Overflow = 0 Carry = 1 Overflow = (-38) 157 (-99) (-113) Carry = 0 Overflow = 1 Carry = 1 Overflow = 1

53 Representing Real Numbers Real numbers A number with a whole part and a fractional part , , 357.0, and Positions to the right of the decimal point are the tenths position: 10-1, 10-2,

54 Representing Real Numbers Same rules apply in binary as in decimal Decimal point is actually the radix point Positions to the right of the radix point in binary are 2-1 (one half), 2-2 (one quarter), 2-3 (one eighth) 54

55 Examples: Representing fractional numbers Find the binary representations of: = = 0.11 Using only 8 binary digits find the binary representations of:

56 Representing Real Numbers A real value in base 10 can be defined by the following formula The representation is called floating point because the number of digits is fixed but the radix point floats 56

57 Floating-Point Representation Computer representation of a floating-point number consists of three fixed-size fields: The one-bit sign field is the sign of the stored value. The size of the exponent field, determines the range of values that can be represented. The size of the significand determines the precision of the representation.

58 Floating-Point Representation The IEEE-754 single precision floating point standard uses an 8-bit exponent and a 23-bit significand. The IEEE-754 double precision standard uses an 11-bit exponent and a 52-bit significand. For illustrative purposes, (and to keep life VERY simple) For illustrative purposes, (and to keep life VERY simple) we will use a 14-bit model with a 5-bit exponent and an 8- bit significand.

59 Floating-Point Representation The significand of a floating-point number is always preceded by an implied binary point. The significand contains a fractional binary value. The exponent is the power of 2 to which the significand is raised. Example: Express in the simplified 14-bit floating-point model. We know that is 2 5. So in (binary) scientific notation = 1.0 x 2 5 = 0.1 x 2 6. Using this information, we put 110 (= 6 10 ) in the exponent field and 1 in the significand as shown.

60 Floating-Point Representation BUT WAIT It s not that simple!! The illustrations shown at the right are all equivalent representations for 32 using our simplified model. Not only do these synonymous representations waste space, but they can also cause confusion. Another problem with our system is that we have made no allowances for negative exponents. We have no way to express 0.5 (=2-1 )! (There is no sign in the exponent field!) All of these problems can be fixed with no changes to our basic model. 60

61 Floating-Point Representation To resolve the issue of synonymous forms, we ll use a rule that t the first digit of the significand must be 1. This gives a unique pattern for each number. In the IEEE-754 standard, this 1 is implied meaning that a 1 is assumed after the binary point. By using an implied 1, we increase the precision of the representation by a power of two. (Why?) In our simple instructional model, we will not use the implied bits mechanism the 1 will BE there. To provide for negative exponents, we ll use a biased exponent We have a 5-bit exponent. We ll use 16 for our bias. This is called excess-16 representation. In our model, exponent values less than 16 are negative, meaning that the number we re representing is negative.

62 IEEE Example 1 Convert 6.75 to 32 bit IEEE format. 1.The Mantissa. The Integer first. 6 / 2 = 3 r 0 3 / 2 = 1 r 1 1 / 2 = 0 r 1 2. Fraction next..75 * 2 = * 2 = 1.0 = = put the two parts together Now normalise * 2 2

63 IEEE Biased 127 Exponent To generate a biased 127 exponent Take the value of the signed exponent and add 127. Example then = and my value for the exponent would be 143 = So it is simply now an unsigned value... 63

64 Binary Possible Representations of an Exponent Sign Magnitude 2's Complement Biased 127 Exponent {reserved} {reserved} 64

65 Floating-Point Representation From Decimal to Floating Point. Example: Express in the revised 14-bit floating-point model. We know that 32 = 1.0 x 2 5 = 0.1 x 2 6. To use our excess 16 biased exponent, we add 16 to 6,,giving g22 10 (= ) ). Example: Express in the revised 14-bit floating-point model. We know that is 2-4. So in (binary) scientific notation = 1.0 x 2-4 = 0.1 x 2-3. To use our excess 16 biased exponent, we add 16 to -3, giving (= ).

66 2.5 Floating-Point Representation From Decimal to Floating Point. Example: Express in the revised 14-bit floating-point model. We find = Normalizing, we have: = x 2 5. To use our excess 16 biased exponent, we add 16 to 5, giving (= ). We also need a 1 in the sign bit.

67 Floating-Point Representation From Floating Point to Decimal Exponents will be stored using excess-16 Sign bit = 0 (positive) Exponent = 5 ( = 5) Significand = We shift the decimal point 5 positions giving us = +17 Sign bit = 0 (positive) Exponent = -2 ( = -2) Significand = We shift the decimal point 2 positions to the left, giving us = Sign bit = 1 (negative) Exponent = 3 ( = 3) Significand = We shift the decimal point 3 positions to the right, giving =

68 Representation in IEEE 754 single sign bit: precision 0 for positive and, 1for negative numbers 8biased exponent by bit normalised mantissa Sign Exponent Mantissa 68

69 Example (2) which number does the following IEEE single precision notation represent? The sign bit is 1, hence it is a negative number. The exponent is = It is biased by 127, hence the real exponent is = 1. The mantissa: It is normalised, hence the true mantissa is 1.01 = Finally, the number represented is: x 2 1 =

70 Floating-Point Representation Floating-point addition and subtraction are done the same as using pencil and paper. The first thing that we do is express both operands in the same exponential power, then add the numbers, keeping the exponent in the sum. If the exponent needs adjustment, t fix it at the end. Example: Find the sum of and using the 14-bit floating-point model. We find = x 2 4. And = x 2 1 = x 2 4. Thus, our sum is x 2 4.

71 Floating-Point Representation When discussing i floating-point i t numbers, it is important t to understand the terms range, precision, and accuracy. The range of a numeric integer format is the difference between the largest and smallest values that it can express. Accuracy refers to how closely a numeric representation approximates a true value. The precision of a number indicates how much information we have about a value

72 Range of numbers Normalized (positive range; negative e is symmetric) smallest (1+0) =2-126 largest ( ) ( ) Positive underflow Positive overflow 2014/8/25 PITT CS

73 Floating-Point Representation No matter how many bits we use in a floating-point representation, our model must be finite. The real number system is infinite, so F.P. can give nothing more than an approximation of a real value. At some point, every model breaks down, introducing errors into our calculations. By using a greater number of bits in our model, we can reduce these errors, but we can never totally eliminate them. Our job becomes one of reducing error, or at least being aware of the possible magnitude of error in our calculations. Errors can compound through repetitive arithmetic operations. For example, our 14-bit model cannot exactly represent the decimal value In binary, it is 9 bits wide: = %

74 Floating-Point Representation Floating-point overflow and underflow can cause programs to crash. Overflow occurs when there is no room to store the high-order bits resulting from a calculation. Underflow occurs when a value is too small to store, possibly resulting in division by zero. The hardware detects the error, causes an interrupt that is caught by the OS which terminates the process. It s better for a program to crash than to have it produce incorrect, but plausible, results.

75 IEEE 754 Encoding Single Precision Double Precision Represented Object Exponent Fraction Exponent Fraction non-zero 0 non-zero 1~254 anything 1~2046 anything +/- denormalized number +/- floating-point numbers /- infinity it 255 non-zero 2047 non-zero NaN (Not a Number) 75 75

76 Representing Text What must be provided d to represent text? t? There are a finite number of characters to represent, so list them all and assign each a binary string. Character set A list of characters and the codes used to represent each one Computer manufacturers agreed to standardize 76

77 The ASCII Character Set ASCII stands for American Standard Code for Information Interchange ASCII originally used seven bits to represent each character, allowing for 128 unique characters Later extended ASCII evolved so that all eight bits were used How many characters could be represented? 77

78 78 ASCII Character Set Mapping

79 The ASCII Character Set The first 32 characters in the ASCII character chart do not have a simple character representation to print to the screen What do you think they are used for? 79

80 Character strings How to represent character strings? A collection of adjacent words (bit-string units) can store a sequence of letters 'H' 'e' ' 'l' 'l' o' ' ' 'W' 'o'' 'r'' 'l' 'd' '\0' Notation: o enclose strings in double quotes "Hello world" Representation convention: null character defines end of string Null is sometimes written as '\0' Its binary representation is the number 0 80

81 exercise Use the ASCII table to write the ASCII code for the following: CIS110 6=2*3 81

82 The Unicode Character Set Extended ASCII is not enough for international use One Unicode mapping uses 16 bits per character How many characters can this mapping represent? Unicode is a superset of ASCII The first 256 characters correspond exactly 82 to the extended ASCII character set

83 The Unicode Character Set Figure 3.6 A few characters in the Unicode character set 83

84 the end

Computer Science 281 Binary and Hexadecimal Review

Computer Science 281 Binary and Hexadecimal Review Computer Science 281 Binary and Hexadecimal Review 1 The Binary Number System Computers store everything, both instructions and data, by using many, many transistors, each of which can be in one of two

More information

Oct: 50 8 = 6 (r = 2) 6 8 = 0 (r = 6) Writing the remainders in reverse order we get: (50) 10 = (62) 8

Oct: 50 8 = 6 (r = 2) 6 8 = 0 (r = 6) Writing the remainders in reverse order we get: (50) 10 = (62) 8 ECE Department Summer LECTURE #5: Number Systems EEL : Digital Logic and Computer Systems Based on lecture notes by Dr. Eric M. Schwartz Decimal Number System: -Our standard number system is base, also

More information

Binary Representation. Number Systems. Base 10, Base 2, Base 16. Positional Notation. Conversion of Any Base to Decimal.

Binary Representation. Number Systems. Base 10, Base 2, Base 16. Positional Notation. Conversion of Any Base to Decimal. Binary Representation The basis of all digital data is binary representation. Binary - means two 1, 0 True, False Hot, Cold On, Off We must be able to handle more than just values for real world problems

More information

Binary Division. Decimal Division. Hardware for Binary Division. Simple 16-bit Divider Circuit

Binary Division. Decimal Division. Hardware for Binary Division. Simple 16-bit Divider Circuit Decimal Division Remember 4th grade long division? 43 // quotient 12 521 // divisor dividend -480 41-36 5 // remainder Shift divisor left (multiply by 10) until MSB lines up with dividend s Repeat until

More information

Number Representation

Number Representation Number Representation CS10001: Programming & Data Structures Pallab Dasgupta Professor, Dept. of Computer Sc. & Engg., Indian Institute of Technology Kharagpur Topics to be Discussed How are numeric data

More information

Divide: Paper & Pencil. Computer Architecture ALU Design : Division and Floating Point. Divide algorithm. DIVIDE HARDWARE Version 1

Divide: Paper & Pencil. Computer Architecture ALU Design : Division and Floating Point. Divide algorithm. DIVIDE HARDWARE Version 1 Divide: Paper & Pencil Computer Architecture ALU Design : Division and Floating Point 1001 Quotient Divisor 1000 1001010 Dividend 1000 10 101 1010 1000 10 (or Modulo result) See how big a number can be

More information

The string of digits 101101 in the binary number system represents the quantity

The string of digits 101101 in the binary number system represents the quantity Data Representation Section 3.1 Data Types Registers contain either data or control information Control information is a bit or group of bits used to specify the sequence of command signals needed for

More information

ECE 0142 Computer Organization. Lecture 3 Floating Point Representations

ECE 0142 Computer Organization. Lecture 3 Floating Point Representations ECE 0142 Computer Organization Lecture 3 Floating Point Representations 1 Floating-point arithmetic We often incur floating-point programming. Floating point greatly simplifies working with large (e.g.,

More information

1. Give the 16 bit signed (twos complement) representation of the following decimal numbers, and convert to hexadecimal:

1. Give the 16 bit signed (twos complement) representation of the following decimal numbers, and convert to hexadecimal: Exercises 1 - number representations Questions 1. Give the 16 bit signed (twos complement) representation of the following decimal numbers, and convert to hexadecimal: (a) 3012 (b) - 435 2. For each of

More information

Levent EREN levent.eren@ieu.edu.tr A-306 Office Phone:488-9882 INTRODUCTION TO DIGITAL LOGIC

Levent EREN levent.eren@ieu.edu.tr A-306 Office Phone:488-9882 INTRODUCTION TO DIGITAL LOGIC Levent EREN levent.eren@ieu.edu.tr A-306 Office Phone:488-9882 1 Number Systems Representation Positive radix, positional number systems A number with radix r is represented by a string of digits: A n

More information

LSN 2 Number Systems. ECT 224 Digital Computer Fundamentals. Department of Engineering Technology

LSN 2 Number Systems. ECT 224 Digital Computer Fundamentals. Department of Engineering Technology LSN 2 Number Systems Department of Engineering Technology LSN 2 Decimal Number System Decimal number system has 10 digits (0-9) Base 10 weighting system... 10 5 10 4 10 3 10 2 10 1 10 0. 10-1 10-2 10-3

More information

CSI 333 Lecture 1 Number Systems

CSI 333 Lecture 1 Number Systems CSI 333 Lecture 1 Number Systems 1 1 / 23 Basics of Number Systems Ref: Appendix C of Deitel & Deitel. Weighted Positional Notation: 192 = 2 10 0 + 9 10 1 + 1 10 2 General: Digit sequence : d n 1 d n 2...

More information

This Unit: Floating Point Arithmetic. CIS 371 Computer Organization and Design. Readings. Floating Point (FP) Numbers

This Unit: Floating Point Arithmetic. CIS 371 Computer Organization and Design. Readings. Floating Point (FP) Numbers This Unit: Floating Point Arithmetic CIS 371 Computer Organization and Design Unit 7: Floating Point App App App System software Mem CPU I/O Formats Precision and range IEEE 754 standard Operations Addition

More information

Lecture 11: Number Systems

Lecture 11: Number Systems Lecture 11: Number Systems Numeric Data Fixed point Integers (12, 345, 20567 etc) Real fractions (23.45, 23., 0.145 etc.) Floating point such as 23. 45 e 12 Basically an exponent representation Any number

More information

Data Storage 3.1. Foundations of Computer Science Cengage Learning

Data Storage 3.1. Foundations of Computer Science Cengage Learning 3 Data Storage 3.1 Foundations of Computer Science Cengage Learning Objectives After studying this chapter, the student should be able to: List five different data types used in a computer. Describe how

More information

Solution for Homework 2

Solution for Homework 2 Solution for Homework 2 Problem 1 a. What is the minimum number of bits that are required to uniquely represent the characters of English alphabet? (Consider upper case characters alone) The number of

More information

To convert an arbitrary power of 2 into its English equivalent, remember the rules of exponential arithmetic:

To convert an arbitrary power of 2 into its English equivalent, remember the rules of exponential arithmetic: Binary Numbers In computer science we deal almost exclusively with binary numbers. it will be very helpful to memorize some binary constants and their decimal and English equivalents. By English equivalents

More information

Data Storage. Chapter 3. Objectives. 3-1 Data Types. Data Inside the Computer. After studying this chapter, students should be able to:

Data Storage. Chapter 3. Objectives. 3-1 Data Types. Data Inside the Computer. After studying this chapter, students should be able to: Chapter 3 Data Storage Objectives After studying this chapter, students should be able to: List five different data types used in a computer. Describe how integers are stored in a computer. Describe how

More information

Lecture 2. Binary and Hexadecimal Numbers

Lecture 2. Binary and Hexadecimal Numbers Lecture 2 Binary and Hexadecimal Numbers Purpose: Review binary and hexadecimal number representations Convert directly from one base to another base Review addition and subtraction in binary representations

More information

Systems I: Computer Organization and Architecture

Systems I: Computer Organization and Architecture Systems I: Computer Organization and Architecture Lecture 2: Number Systems and Arithmetic Number Systems - Base The number system that we use is base : 734 = + 7 + 3 + 4 = x + 7x + 3x + 4x = x 3 + 7x

More information

EE 261 Introduction to Logic Circuits. Module #2 Number Systems

EE 261 Introduction to Logic Circuits. Module #2 Number Systems EE 261 Introduction to Logic Circuits Module #2 Number Systems Topics A. Number System Formation B. Base Conversions C. Binary Arithmetic D. Signed Numbers E. Signed Arithmetic F. Binary Codes Textbook

More information

CPEN 214 - Digital Logic Design Binary Systems

CPEN 214 - Digital Logic Design Binary Systems CPEN 4 - Digital Logic Design Binary Systems C. Gerousis Digital Design 3 rd Ed., Mano Prentice Hall Digital vs. Analog An analog system has continuous range of values A mercury thermometer Vinyl records

More information

2011, The McGraw-Hill Companies, Inc. Chapter 3

2011, The McGraw-Hill Companies, Inc. Chapter 3 Chapter 3 3.1 Decimal System The radix or base of a number system determines the total number of different symbols or digits used by that system. The decimal system has a base of 10 with the digits 0 through

More information

Digital System Design Prof. D Roychoudhry Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

Digital System Design Prof. D Roychoudhry Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Digital System Design Prof. D Roychoudhry Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture - 04 Digital Logic II May, I before starting the today s lecture

More information

Binary Number System. 16. Binary Numbers. Base 10 digits: 0 1 2 3 4 5 6 7 8 9. Base 2 digits: 0 1

Binary Number System. 16. Binary Numbers. Base 10 digits: 0 1 2 3 4 5 6 7 8 9. Base 2 digits: 0 1 Binary Number System 1 Base 10 digits: 0 1 2 3 4 5 6 7 8 9 Base 2 digits: 0 1 Recall that in base 10, the digits of a number are just coefficients of powers of the base (10): 417 = 4 * 10 2 + 1 * 10 1

More information

Binary Representation

Binary Representation Binary Representation The basis of all digital data is binary representation. Binary - means two 1, 0 True, False Hot, Cold On, Off We must tbe able to handle more than just values for real world problems

More information

Useful Number Systems

Useful Number Systems Useful Number Systems Decimal Base = 10 Digit Set = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9} Binary Base = 2 Digit Set = {0, 1} Octal Base = 8 = 2 3 Digit Set = {0, 1, 2, 3, 4, 5, 6, 7} Hexadecimal Base = 16 = 2

More information

CS321. Introduction to Numerical Methods

CS321. Introduction to Numerical Methods CS3 Introduction to Numerical Methods Lecture Number Representations and Errors Professor Jun Zhang Department of Computer Science University of Kentucky Lexington, KY 40506-0633 August 7, 05 Number in

More information

NUMBER SYSTEMS. William Stallings

NUMBER SYSTEMS. William Stallings NUMBER SYSTEMS William Stallings The Decimal System... The Binary System...3 Converting between Binary and Decimal...3 Integers...4 Fractions...5 Hexadecimal Notation...6 This document available at WilliamStallings.com/StudentSupport.html

More information

CDA 3200 Digital Systems. Instructor: Dr. Janusz Zalewski Developed by: Dr. Dahai Guo Spring 2012

CDA 3200 Digital Systems. Instructor: Dr. Janusz Zalewski Developed by: Dr. Dahai Guo Spring 2012 CDA 3200 Digital Systems Instructor: Dr. Janusz Zalewski Developed by: Dr. Dahai Guo Spring 2012 Outline Data Representation Binary Codes Why 6-3-1-1 and Excess-3? Data Representation (1/2) Each numbering

More information

CS101 Lecture 11: Number Systems and Binary Numbers. Aaron Stevens 14 February 2011

CS101 Lecture 11: Number Systems and Binary Numbers. Aaron Stevens 14 February 2011 CS101 Lecture 11: Number Systems and Binary Numbers Aaron Stevens 14 February 2011 1 2 1 3!!! MATH WARNING!!! TODAY S LECTURE CONTAINS TRACE AMOUNTS OF ARITHMETIC AND ALGEBRA PLEASE BE ADVISED THAT CALCULTORS

More information

plc numbers - 13.1 Encoded values; BCD and ASCII Error detection; parity, gray code and checksums

plc numbers - 13.1 Encoded values; BCD and ASCII Error detection; parity, gray code and checksums plc numbers - 3. Topics: Number bases; binary, octal, decimal, hexadecimal Binary calculations; s compliments, addition, subtraction and Boolean operations Encoded values; BCD and ASCII Error detection;

More information

Numbering Systems. InThisAppendix...

Numbering Systems. InThisAppendix... G InThisAppendix... Introduction Binary Numbering System Hexadecimal Numbering System Octal Numbering System Binary Coded Decimal (BCD) Numbering System Real (Floating Point) Numbering System BCD/Binary/Decimal/Hex/Octal

More information

HOMEWORK # 2 SOLUTIO

HOMEWORK # 2 SOLUTIO HOMEWORK # 2 SOLUTIO Problem 1 (2 points) a. There are 313 characters in the Tamil language. If every character is to be encoded into a unique bit pattern, what is the minimum number of bits required to

More information

COMP 250 Fall 2012 lecture 2 binary representations Sept. 11, 2012

COMP 250 Fall 2012 lecture 2 binary representations Sept. 11, 2012 Binary numbers The reason humans represent numbers using decimal (the ten digits from 0,1,... 9) is that we have ten fingers. There is no other reason than that. There is nothing special otherwise about

More information

6 3 4 9 = 6 10 + 3 10 + 4 10 + 9 10

6 3 4 9 = 6 10 + 3 10 + 4 10 + 9 10 Lesson The Binary Number System. Why Binary? The number system that you are familiar with, that you use every day, is the decimal number system, also commonly referred to as the base- system. When you

More information

Chapter 1: Digital Systems and Binary Numbers

Chapter 1: Digital Systems and Binary Numbers Chapter 1: Digital Systems and Binary Numbers Digital age and information age Digital computers general purposes many scientific, industrial and commercial applications Digital systems telephone switching

More information

Binary Numbering Systems

Binary Numbering Systems Binary Numbering Systems April 1997, ver. 1 Application Note 83 Introduction Binary numbering systems are used in virtually all digital systems, including digital signal processing (DSP), networking, and

More information

NUMBER SYSTEMS. 1.1 Introduction

NUMBER SYSTEMS. 1.1 Introduction NUMBER SYSTEMS 1.1 Introduction There are several number systems which we normally use, such as decimal, binary, octal, hexadecimal, etc. Amongst them we are most familiar with the decimal number system.

More information

CHAPTER 5 Round-off errors

CHAPTER 5 Round-off errors CHAPTER 5 Round-off errors In the two previous chapters we have seen how numbers can be represented in the binary numeral system and how this is the basis for representing numbers in computers. Since any

More information

Binary, Hexadecimal, Octal, and BCD Numbers

Binary, Hexadecimal, Octal, and BCD Numbers 23CH_PHCalter_TMSETE_949118 23/2/2007 1:37 PM Page 1 Binary, Hexadecimal, Octal, and BCD Numbers OBJECTIVES When you have completed this chapter, you should be able to: Convert between binary and decimal

More information

Chapter 2. Binary Values and Number Systems

Chapter 2. Binary Values and Number Systems Chapter 2 Binary Values and Number Systems Numbers Natural numbers, a.k.a. positive integers Zero and any number obtained by repeatedly adding one to it. Examples: 100, 0, 45645, 32 Negative numbers A

More information

Base Conversion written by Cathy Saxton

Base Conversion written by Cathy Saxton Base Conversion written by Cathy Saxton 1. Base 10 In base 10, the digits, from right to left, specify the 1 s, 10 s, 100 s, 1000 s, etc. These are powers of 10 (10 x ): 10 0 = 1, 10 1 = 10, 10 2 = 100,

More information

This 3-digit ASCII string could also be calculated as n = (Data[2]-0x30) +10*((Data[1]-0x30)+10*(Data[0]-0x30));

This 3-digit ASCII string could also be calculated as n = (Data[2]-0x30) +10*((Data[1]-0x30)+10*(Data[0]-0x30)); Introduction to Embedded Microcomputer Systems Lecture 5.1 2.9. Conversions ASCII to binary n = 100*(Data[0]-0x30) + 10*(Data[1]-0x30) + (Data[2]-0x30); This 3-digit ASCII string could also be calculated

More information

2010/9/19. Binary number system. Binary numbers. Outline. Binary to decimal

2010/9/19. Binary number system. Binary numbers. Outline. Binary to decimal 2/9/9 Binary number system Computer (electronic) systems prefer binary numbers Binary number: represent a number in base-2 Binary numbers 2 3 + 7 + 5 Some terminology Bit: a binary digit ( or ) Hexadecimal

More information

Binary Numbers. Binary Octal Hexadecimal

Binary Numbers. Binary Octal Hexadecimal Binary Numbers Binary Octal Hexadecimal Binary Numbers COUNTING SYSTEMS UNLIMITED... Since you have been using the 10 different digits 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9 all your life, you may wonder how

More information

Digital Design. Assoc. Prof. Dr. Berna Örs Yalçın

Digital Design. Assoc. Prof. Dr. Berna Örs Yalçın Digital Design Assoc. Prof. Dr. Berna Örs Yalçın Istanbul Technical University Faculty of Electrical and Electronics Engineering Office Number: 2318 E-mail: siddika.ors@itu.edu.tr Grading 1st Midterm -

More information

The Answer to the 14 Most Frequently Asked Modbus Questions

The Answer to the 14 Most Frequently Asked Modbus Questions Modbus Frequently Asked Questions WP-34-REV0-0609-1/7 The Answer to the 14 Most Frequently Asked Modbus Questions Exactly what is Modbus? Modbus is an open serial communications protocol widely used in

More information

Chapter 4: Computer Codes

Chapter 4: Computer Codes Slide 1/30 Learning Objectives In this chapter you will learn about: Computer data Computer codes: representation of data in binary Most commonly used computer codes Collating sequence 36 Slide 2/30 Data

More information

DNA Data and Program Representation. Alexandre David 1.2.05 adavid@cs.aau.dk

DNA Data and Program Representation. Alexandre David 1.2.05 adavid@cs.aau.dk DNA Data and Program Representation Alexandre David 1.2.05 adavid@cs.aau.dk Introduction Very important to understand how data is represented. operations limits precision Digital logic built on 2-valued

More information

Section 1.4 Place Value Systems of Numeration in Other Bases

Section 1.4 Place Value Systems of Numeration in Other Bases Section.4 Place Value Systems of Numeration in Other Bases Other Bases The Hindu-Arabic system that is used in most of the world today is a positional value system with a base of ten. The simplest reason

More information

Number Systems. Introduction / Number Systems

Number Systems. Introduction / Number Systems Number Systems Introduction / Number Systems Data Representation Data representation can be Digital or Analog In Analog representation values are represented over a continuous range In Digital representation

More information

Numeral Systems. The number twenty-five can be represented in many ways: Decimal system (base 10): 25 Roman numerals:

Numeral Systems. The number twenty-five can be represented in many ways: Decimal system (base 10): 25 Roman numerals: Numeral Systems Which number is larger? 25 8 We need to distinguish between numbers and the symbols that represent them, called numerals. The number 25 is larger than 8, but the numeral 8 above is larger

More information

Number Systems and Radix Conversion

Number Systems and Radix Conversion Number Systems and Radix Conversion Sanjay Rajopadhye, Colorado State University 1 Introduction These notes for CS 270 describe polynomial number systems. The material is not in the textbook, but will

More information

CS201: Architecture and Assembly Language

CS201: Architecture and Assembly Language CS201: Architecture and Assembly Language Lecture Three Brendan Burns CS201: Lecture Three p.1/27 Arithmetic for computers Previously we saw how we could represent unsigned numbers in binary and how binary

More information

Computers. Hardware. The Central Processing Unit (CPU) CMPT 125: Lecture 1: Understanding the Computer

Computers. Hardware. The Central Processing Unit (CPU) CMPT 125: Lecture 1: Understanding the Computer Computers CMPT 125: Lecture 1: Understanding the Computer Tamara Smyth, tamaras@cs.sfu.ca School of Computing Science, Simon Fraser University January 3, 2009 A computer performs 2 basic functions: 1.

More information

Bachelors of Computer Application Programming Principle & Algorithm (BCA-S102T)

Bachelors of Computer Application Programming Principle & Algorithm (BCA-S102T) Unit- I Introduction to c Language: C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating

More information

Goals. Unary Numbers. Decimal Numbers. 3,148 is. 1000 s 100 s 10 s 1 s. Number Bases 1/12/2009. COMP370 Intro to Computer Architecture 1

Goals. Unary Numbers. Decimal Numbers. 3,148 is. 1000 s 100 s 10 s 1 s. Number Bases 1/12/2009. COMP370 Intro to Computer Architecture 1 Number Bases //9 Goals Numbers Understand binary and hexadecimal numbers Be able to convert between number bases Understand binary fractions COMP37 Introduction to Computer Architecture Unary Numbers Decimal

More information

Measures of Error: for exact x and approximation x Absolute error e = x x. Relative error r = (x x )/x.

Measures of Error: for exact x and approximation x Absolute error e = x x. Relative error r = (x x )/x. ERRORS and COMPUTER ARITHMETIC Types of Error in Numerical Calculations Initial Data Errors: from experiment, modeling, computer representation; problem dependent but need to know at beginning of calculation.

More information

Arithmetic in MIPS. Objectives. Instruction. Integer arithmetic. After completing this lab you will:

Arithmetic in MIPS. Objectives. Instruction. Integer arithmetic. After completing this lab you will: 6 Objectives After completing this lab you will: know how to do integer arithmetic in MIPS know how to do floating point arithmetic in MIPS know about conversion from integer to floating point and from

More information

Number Conversions Dr. Sarita Agarwal (Acharya Narendra Dev College,University of Delhi)

Number Conversions Dr. Sarita Agarwal (Acharya Narendra Dev College,University of Delhi) Conversions Dr. Sarita Agarwal (Acharya Narendra Dev College,University of Delhi) INTRODUCTION System- A number system defines a set of values to represent quantity. We talk about the number of people

More information

Attention: This material is copyright 1995-1997 Chris Hecker. All rights reserved.

Attention: This material is copyright 1995-1997 Chris Hecker. All rights reserved. Attention: This material is copyright 1995-1997 Chris Hecker. All rights reserved. You have permission to read this article for your own education. You do not have permission to put it on your website

More information

Lecture 8: Binary Multiplication & Division

Lecture 8: Binary Multiplication & Division Lecture 8: Binary Multiplication & Division Today s topics: Addition/Subtraction Multiplication Division Reminder: get started early on assignment 3 1 2 s Complement Signed Numbers two = 0 ten 0001 two

More information

Correctly Rounded Floating-point Binary-to-Decimal and Decimal-to-Binary Conversion Routines in Standard ML. By Prashanth Tilleti

Correctly Rounded Floating-point Binary-to-Decimal and Decimal-to-Binary Conversion Routines in Standard ML. By Prashanth Tilleti Correctly Rounded Floating-point Binary-to-Decimal and Decimal-to-Binary Conversion Routines in Standard ML By Prashanth Tilleti Advisor Dr. Matthew Fluet Department of Computer Science B. Thomas Golisano

More information

3. Convert a number from one number system to another

3. Convert a number from one number system to another 3. Convert a number from one number system to another Conversion between number bases: Hexa (16) Decimal (10) Binary (2) Octal (8) More Interest Way we need conversion? We need decimal system for real

More information

Everything you wanted to know about using Hexadecimal and Octal Numbers in Visual Basic 6

Everything you wanted to know about using Hexadecimal and Octal Numbers in Visual Basic 6 Everything you wanted to know about using Hexadecimal and Octal Numbers in Visual Basic 6 Number Systems No course on programming would be complete without a discussion of the Hexadecimal (Hex) number

More information

ASCII Characters. 146 CHAPTER 3 Information Representation. The sign bit is 1, so the number is negative. Converting to decimal gives

ASCII Characters. 146 CHAPTER 3 Information Representation. The sign bit is 1, so the number is negative. Converting to decimal gives 146 CHAPTER 3 Information Representation The sign bit is 1, so the number is negative. Converting to decimal gives 37A (hex) = 134 (dec) Notice that the hexadecimal number is not written with a negative

More information

Number and codes in digital systems

Number and codes in digital systems Number and codes in digital systems Decimal Numbers You are familiar with the decimal number system because you use them everyday. But their weighted structure is not understood. In the decimal number

More information

Binary Adders: Half Adders and Full Adders

Binary Adders: Half Adders and Full Adders Binary Adders: Half Adders and Full Adders In this set of slides, we present the two basic types of adders: 1. Half adders, and 2. Full adders. Each type of adder functions to add two binary bits. In order

More information

Chapter 1. Binary, octal and hexadecimal numbers

Chapter 1. Binary, octal and hexadecimal numbers Chapter 1. Binary, octal and hexadecimal numbers This material is covered in the books: Nelson Magor Cooke et al, Basic mathematics for electronics (7th edition), Glencoe, Lake Forest, Ill., 1992. [Hamilton

More information

Today s topics. Digital Computers. More on binary. Binary Digits (Bits)

Today s topics. Digital Computers. More on binary. Binary Digits (Bits) Today s topics! Binary Numbers! Brookshear.-.! Slides from Prof. Marti Hearst of UC Berkeley SIMS! Upcoming! Networks Interactive Introduction to Graph Theory http://www.utm.edu/cgi-bin/caldwell/tutor/departments/math/graph/intro

More information

Numerical Matrix Analysis

Numerical Matrix Analysis Numerical Matrix Analysis Lecture Notes #10 Conditioning and / Peter Blomgren, blomgren.peter@gmail.com Department of Mathematics and Statistics Dynamical Systems Group Computational Sciences Research

More information

2 Number Systems. Source: Foundations of Computer Science Cengage Learning. Objectives After studying this chapter, the student should be able to:

2 Number Systems. Source: Foundations of Computer Science Cengage Learning. Objectives After studying this chapter, the student should be able to: 2 Number Systems 2.1 Source: Foundations of Computer Science Cengage Learning Objectives After studying this chapter, the student should be able to: Understand the concept of number systems. Distinguish

More information

26 Integers: Multiplication, Division, and Order

26 Integers: Multiplication, Division, and Order 26 Integers: Multiplication, Division, and Order Integer multiplication and division are extensions of whole number multiplication and division. In multiplying and dividing integers, the one new issue

More information

Chapter 5. Binary, octal and hexadecimal numbers

Chapter 5. Binary, octal and hexadecimal numbers Chapter 5. Binary, octal and hexadecimal numbers A place to look for some of this material is the Wikipedia page http://en.wikipedia.org/wiki/binary_numeral_system#counting_in_binary Another place that

More information

Counting in base 10, 2 and 16

Counting in base 10, 2 and 16 Counting in base 10, 2 and 16 1. Binary Numbers A super-important fact: (Nearly all) Computers store all information in the form of binary numbers. Numbers, characters, images, music files --- all of these

More information

Unit 1 Number Sense. In this unit, students will study repeating decimals, percents, fractions, decimals, and proportions.

Unit 1 Number Sense. In this unit, students will study repeating decimals, percents, fractions, decimals, and proportions. Unit 1 Number Sense In this unit, students will study repeating decimals, percents, fractions, decimals, and proportions. BLM Three Types of Percent Problems (p L-34) is a summary BLM for the material

More information

A single register, called the accumulator, stores the. operand before the operation, and stores the result. Add y # add y from memory to the acc

A single register, called the accumulator, stores the. operand before the operation, and stores the result. Add y # add y from memory to the acc Other architectures Example. Accumulator-based machines A single register, called the accumulator, stores the operand before the operation, and stores the result after the operation. Load x # into acc

More information

The programming language C. sws1 1

The programming language C. sws1 1 The programming language C sws1 1 The programming language C invented by Dennis Ritchie in early 1970s who used it to write the first Hello World program C was used to write UNIX Standardised as K&C (Kernighan

More information

MEP Y9 Practice Book A

MEP Y9 Practice Book A 1 Base Arithmetic 1.1 Binary Numbers We normally work with numbers in base 10. In this section we consider numbers in base 2, often called binary numbers. In base 10 we use the digits 0, 1, 2, 3, 4, 5,

More information

Figure 1. A typical Laboratory Thermometer graduated in C.

Figure 1. A typical Laboratory Thermometer graduated in C. SIGNIFICANT FIGURES, EXPONENTS, AND SCIENTIFIC NOTATION 2004, 1990 by David A. Katz. All rights reserved. Permission for classroom use as long as the original copyright is included. 1. SIGNIFICANT FIGURES

More information

Today. Binary addition Representing negative numbers. Andrew H. Fagg: Embedded Real- Time Systems: Binary Arithmetic

Today. Binary addition Representing negative numbers. Andrew H. Fagg: Embedded Real- Time Systems: Binary Arithmetic Today Binary addition Representing negative numbers 2 Binary Addition Consider the following binary numbers: 0 0 1 0 0 1 1 0 0 0 1 0 1 0 1 1 How do we add these numbers? 3 Binary Addition 0 0 1 0 0 1 1

More information

The New IoT Standard: Any App for Any Device Using Any Data Format. Mike Weiner Product Manager, Omega DevCloud KORE Telematics

The New IoT Standard: Any App for Any Device Using Any Data Format. Mike Weiner Product Manager, Omega DevCloud KORE Telematics The New IoT Standard: Any App for Any Device Using Any Data Format Mike Weiner Product Manager, Omega DevCloud KORE Telematics About KORE The world s largest M2M/IoT services provider 12 Carriers Enterprise

More information

How do you compare numbers? On a number line, larger numbers are to the right and smaller numbers are to the left.

How do you compare numbers? On a number line, larger numbers are to the right and smaller numbers are to the left. The verbal answers to all of the following questions should be memorized before completion of pre-algebra. Answers that are not memorized will hinder your ability to succeed in algebra 1. Number Basics

More information

Monday January 19th 2015 Title: "Transmathematics - a survey of recent results on division by zero" Facilitator: TheNumberNullity / James Anderson, UK

Monday January 19th 2015 Title: Transmathematics - a survey of recent results on division by zero Facilitator: TheNumberNullity / James Anderson, UK Monday January 19th 2015 Title: "Transmathematics - a survey of recent results on division by zero" Facilitator: TheNumberNullity / James Anderson, UK It has been my pleasure to give two presentations

More information

Digital Logic Design. Introduction

Digital Logic Design. Introduction Digital Logic Design Introduction A digital computer stores data in terms of digits (numbers) and proceeds in discrete steps from one state to the next. The states of a digital computer typically involve

More information

Let s put together a Manual Processor

Let s put together a Manual Processor Lecture 14 Let s put together a Manual Processor Hardware Lecture 14 Slide 1 The processor Inside every computer there is at least one processor which can take an instruction, some operands and produce

More information

We can express this in decimal notation (in contrast to the underline notation we have been using) as follows: 9081 + 900b + 90c = 9001 + 100c + 10b

We can express this in decimal notation (in contrast to the underline notation we have been using) as follows: 9081 + 900b + 90c = 9001 + 100c + 10b In this session, we ll learn how to solve problems related to place value. This is one of the fundamental concepts in arithmetic, something every elementary and middle school mathematics teacher should

More information

Review of Scientific Notation and Significant Figures

Review of Scientific Notation and Significant Figures II-1 Scientific Notation Review of Scientific Notation and Significant Figures Frequently numbers that occur in physics and other sciences are either very large or very small. For example, the speed of

More information

MACHINE INSTRUCTIONS AND PROGRAMS

MACHINE INSTRUCTIONS AND PROGRAMS CHAPTER 2 MACHINE INSTRUCTIONS AND PROGRAMS CHAPTER OBJECTIVES In this chapter you will learn about: Machine instructions and program execution, including branching and subroutine call and return operations

More information

Recall the process used for adding decimal numbers. 1. Place the numbers to be added in vertical format, aligning the decimal points.

Recall the process used for adding decimal numbers. 1. Place the numbers to be added in vertical format, aligning the decimal points. 2 MODULE 4. DECIMALS 4a Decimal Arithmetic Adding Decimals Recall the process used for adding decimal numbers. Adding Decimals. To add decimal numbers, proceed as follows: 1. Place the numbers to be added

More information

Math Workshop October 2010 Fractions and Repeating Decimals

Math Workshop October 2010 Fractions and Repeating Decimals Math Workshop October 2010 Fractions and Repeating Decimals This evening we will investigate the patterns that arise when converting fractions to decimals. As an example of what we will be looking at,

More information

THE BINARY NUMBER SYSTEM

THE BINARY NUMBER SYSTEM THE BINARY NUMBER SYSTEM Dr. Robert P. Webber, Longwood University Our civilization uses the base 10 or decimal place value system. Each digit in a number represents a power of 10. For example, 365.42

More information

The BBP Algorithm for Pi

The BBP Algorithm for Pi The BBP Algorithm for Pi David H. Bailey September 17, 2006 1. Introduction The Bailey-Borwein-Plouffe (BBP) algorithm for π is based on the BBP formula for π, which was discovered in 1995 and published

More information

Data Storage. 1s and 0s

Data Storage. 1s and 0s Data Storage As mentioned, computer science involves the study of algorithms and getting machines to perform them before we dive into the algorithm part, let s study the machines that we use today to do

More information

Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program.

Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program. Name: Class: Date: Exam #1 - Prep True/False Indicate whether the statement is true or false. 1. Programming is the process of writing a computer program in a language that the computer can respond to

More information

JobTestPrep's Numeracy Review Decimals & Percentages

JobTestPrep's Numeracy Review Decimals & Percentages JobTestPrep's Numeracy Review Decimals & Percentages 1 Table of contents What is decimal? 3 Converting fractions to decimals 4 Converting decimals to fractions 6 Percentages 6 Adding and subtracting decimals

More information

Positional Numbering System

Positional Numbering System APPENDIX B Positional Numbering System A positional numbering system uses a set of symbols. The value that each symbol represents, however, depends on its face value and its place value, the value associated

More information

What Every Computer Scientist Should Know About Floating-Point Arithmetic

What Every Computer Scientist Should Know About Floating-Point Arithmetic What Every Computer Scientist Should Know About Floating-Point Arithmetic D Note This document is an edited reprint of the paper What Every Computer Scientist Should Know About Floating-Point Arithmetic,

More information

Technical Support Bulletin Nr.18 Modbus Tips

Technical Support Bulletin Nr.18 Modbus Tips Technical Support Bulletin Nr.18 Modbus Tips Contents! Definitions! Implemented commands! Examples of commands or frames! Calculating the logical area! Reading a signed variable! Example of commands supported

More information