ED. Instruction type: SS1 Explicit Coding: D1(L1,B1),D2(B2) – Example ED 3(4,5),8(7) – Example ED X(8),Y Use: Converts packed fields to an edited character.

Slides:



Advertisements
Similar presentations
Programs & Defining Data Ch.5 – pp Data in Computer Memory See page Byte locations in memory - One character per byte location.
Advertisements

The TI-83 Plus Elementary Algebra Calculator Tutorial.
2-1 Chapter 2 - Data Representation Computer Architecture and Organization by M. Murdocca and V. Heuring © 2007 M. Murdocca and V. Heuring Computer Architecture.
Chapter 2: Data Representation
1 12/08/03SW Abingdon and Witney College Binary Converting to and from decimal.
Data Representation – Chapter 3 Sections 3-2, 3-3, 3-4.
1.6 Signed Binary Numbers.
Converting Fractions we have looked at converting FRACTIONS to DECIMALS. We can also show fractions as PERCENTAGES. PER CENT means OUT OF (per)
PCLaw & Electronic Billing
Assembler Concepts Copyright © 2008 by David Woolbright.
Scientific Notation Recognize and use scientific notation.
ECE 2110: Introduction to Digital Systems Signed Number Conversions.
Simple Data Type Representation and conversion of numbers
Presentation © Copyright 2002, Bryan Meyers Defining Data with Definition Specifications Chapter 3.
POWERPOINT THE SECOND In which you will learn about: Scientific notation +/-/x/÷ with sig figs Rounding.
§ 4.3 Scientific Notation. Angel, Elementary Algebra, 7ed 2 Scientific Notation A number written in scientific notation is written as a number greater.
Add, Subtract, Multiply, and Divide Decimals
2-1 Chapter 2 - Data Representation Principles of Computer Architecture by M. Murdocca and V. Heuring © 1999 M. Murdocca and V. Heuring Chapter Contents.
Scientific Notation. What is scientific notation? Scientific notation is a way of expressing really big numbers or really small numbers. It is most often.
Computer Science 111 Fundamentals of Programming I Number Systems.
General Programming Introduction to Computing Science and Programming I.
Skill Area 311 Part A. Lecture Overview Binary Numbers Binary Arithmetic ASCII Code Machine Code Instruction Format Advantages and disadvantages of machine.
Hudson Valley Community College CISS-110 – Programming & Logic I David Goldschmidt, Ph.D.
Mathematical Operations Using Numbers in Scientific Notation.
Multiplying Decimals Lesson 1-7 From /
CIS 020 Assembly Programming Chapter 07 - Decimal Arithmetic Operations © John Urrutia 2012, All Rights Reserved.5/27/20121.
Formatting Screen Output How do I make my numbers look pretty?
Lecture 31 Numeric Edited Alphabetic (A) AlphaNumeric (X) Numeric (9, V, S) Numeric Edited (9, Z, comma, decimal point, minus sign) –Z = zero suppressed.
Algebra Standard 1.0 Recognize and Use Scientific Notation.
To Conquer the FCAT Know question formats Avoid common gridding mistakes Practice using the current FCAT 2.0 Reference Sheet and FCAT calculator Daily.
Chapter 3: Formatted Input/Output Copyright © 2008 W. W. Norton & Company. All rights reserved. 1 Chapter 3 Formatted Input/Output.
Move and Edited Output1 NON-NUMERIC: Left justify the data in the memory location. If the length of the data is smaller than the length of the field (as.
Aim: How can we express a large or small number?
07/12/ Data Representation Two’s Complement & Binary Arithmetic.
1 1 7-Dec-15 Binary Converting to and from decimal.
Format a Workbook Lesson 2 – Microsoft Excel 2010.
Bit Manipulation & Editing Ch. 10 Page 240. Boolean Instructions Bits in the sending field are used to modify bits in the receiving field - – one byte.
Calculations in Chemistry Scientific Math. I CAN convert number to and from SCIENTIFIC NOTATION.
The College of Saint Rose CSC 202 – Introduction to Programming David Goldschmidt, Ph.D.
Section 1.7 Scientific Notation  Powers of 10 Review  Converting Numbers to Scientific Notation  Converting Numbers from Scientific Notation  Simplifying.
SCIENTIFIC NOTATION Expressing a quantity as: a number between 1 and 10 multiplied by 10 to the appropriate power.
CMP 131 Introduction to Computer Programming Violetta Cavalli-Sforza Week 5, Lecture 2 (Tuesday)
 Variables can store data of different types, and different data types can do different things.  PHP supports the following data types:  String  Integer.
Scientific Notation. What is scientific notation Use of powers of 10 in writing a number is called scientific notation. Such number have the form M x.
Converting Fractions to Decimals. Parts of a Fraction 3 4 = the number of parts = the total number of parts that equal a whole.
CONVERTING TO RATIONAL NUMBERS. Whole numbers are 0, 1, 2, 3, 4, … Integers include all the whole numbers and also their negative versions: …, -3, -2,
Secondary Math Essentials Chapter 1.1.  Classify the following numbers using one or more of the following terms:  Natural Number  Whole Number  Integer.
CS 125 Lecture 3 Martin van Bommel. Overflow In 16-bit two’s complement, what happens if we add =
Chapter 3: Formatted Input/Output 1 Chapter 3 Formatted Input/Output.
Starter Using the mini whiteboards record your answers: 1) Name 2 different Character Sets 2) Convert the Hex number 9E into denary 3) Convert the binary.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd.
Math-2 Lesson 5-2 Properties of Exponents part 2.
PACK. Instruction type: SS2 Explicit Coding: D1(L1,B1),D2(L2,B2) – Example PACK 3(4,5),8(9,7) – Example PACK X(3),Y(4) Use: Converts zoned decimal fields.
UNPK. Instruction type: SS2 Explicit Coding: D1(L1,B1),D2(L2,B2) – Example UNPK 3(4,5),8(9,7) – Example UNPK X(3),Y(4) Use: Converts packed fields to.
+ Note On the Use of Different Data Types Use the data type that conserves memory and still accomplishes the desired purpose. For example, depending on.
ECE 2110: Introduction to Digital Systems Signed Number Conversions.
CSCI 198: Lecture 4: Data Representation
Computer programming {weeks 01 and 02}
Standard form is used to express and work with very large and very small numbers, without writing out all the zeros can be written as 3.4 x.
CSCI 161: Lecture 4: Data Representation
Conversions of the type of the value of an expression
ZAP Zero and Add Packed.
Bit Manipulation & Editing
Let’s get some practice!
Chapter 3: Input/Output
Data Types and Expressions
Computer Science 1 Review and finish Number base conversion
Python 4 and 5 Mr. Husch.
Presentation transcript:

ED

Instruction type: SS1 Explicit Coding: D1(L1,B1),D2(B2) – Example ED 3(4,5),8(7) – Example ED X(8),Y Use: Converts packed fields to an edited character format (printable)

Target Field The target field must contain edit characters that describe how the packed field will be edited X’40’ Blank X’20’ Digit Selector X’21’ Digit Selector and Significance Starter X’4B’ Decimal Point X’6B’ Comma X’60’ Negative Sign

Edit Process 1) Build an edit word 2)Move the edit word to the output area 3)Ed-it the packed field into the output area Example: EDWD DC X’ ’ AMTPK DC PL3’-12345’ AMTOUT DS CL7 … MVC AMTOUT,EDWD ED AMOUNT,AMTPK

What happens? D ED X,Y Y X 40 F1 F2 F3 F4 F5 60X Before After

What happens? C ED X,Y Y X 40 F1 F2 F3 F4 F5 40X Before After

What happens? D ED X,Y Y X F0 F4 F5 60X Before After

Making it work Start the edit word with a fill character Count the number of digits in the packed field. Example XPK DS PL4 No of digits = (2 x 4) – 1 = 7 digits The number of 20’s and 21’s in the edit word must match this number It can also contain other edit symbols The output field size must match the edit word field size

Building the Edit Word XPK DS PL4 EDWD DC ???

Building the Edit Word Start with the fill character XPK DS PL4 EDWD DC X’40’

Building the Edit Word Count the digits XPK DS PL4 (4 x 2) – 1 = 7 EDWD DC X’40’

Building the Edit Word Add correct number of 20’s and a 21 XPK DS PL4 (4 x 2) – 1 = 7 EDWD DC X’ ’

Building the Edit Word Add other edit characters as needed XPK DS PL4 (4 x 2) – 1 = 7 EDWD DC X’40204B B ’

Building the Edit Word Count characters in the edit word XPK DS PL4 (4 x 2) – 1 = 7 EDWD DC X’40204B B ’ | 11 |

Building the Edit Word Output field must match edit word XPK DS PL4 (4 x 2) – 1 = 7 EDWD DC X’40204B B ’ | 11 | XOUT DS XL11

Finishing the job Move the edit word to the output area MVC XOUT,EDWD Edit the packed field into the output area ED XOUT,XPK

Common Errors The packed field doesn’t match the edit word field (the number of 20s and 21s must match the number of digits in the packed field) The edit word size must match the output field size

Try it in VisibleZ Try the following programs: – ed.obj – ed1.obj – ed2.obj – ed3.obj – ed4.obj