Download presentation
Presentation is loading. Please wait.
Published byTania Babbs Modified over 10 years ago
2
DAT2343 Summary of Standard Data Encoding © Alan T. Pinck / Algonquin College; 2003
3
Character Encoding Storage Unit = byte ASCII ‘A’:41h …’Z’:5Ah; plus 20h for lower case ‘0’:30h … ‘9’:39h blank:20h; carriage return:0Dh; line feed:0Ah EBCDIC ‘A’:C1h … ‘I’:C9h; ‘J’:D1h …’R’:D9h; ‘S’:E2...‘Z’:E9h subtract 40h for lower case ‘0’:F0h … ‘9’:F9h blank 40h
4
Basic Integer Numeric Forms Storage Unit = word Unsigned Binary position numbers (starting at 0 on right) position weights : 2 position 2’s Complement subtract unsigned binary version of absolute value from 0 (if working in binary) reverse bits and add 1
5
Standard Integer Numeric Flags Zero all bits in result word are 0 may not be a “true” zero e.g. AAAh + 556h (12-bit word) would turn Zero “on” Carry result wrong (too large or less than zero) for unsigned binary Sign copy of left-most bit of result word Overflow result is wrong if treated as 2’s complement (result sign is logically impossible for given operand signs)
6
Basic Float Form : 32-bit IEEE-754 1 bit : sign (0=positive; 1=negative) 8 bits: excess-127 binary exponent 23 bits : normalized binary mantissa without leading 1.0
7
Hybrid Character-Numeric Forms Zoned Decimal Fd Fd … FD sd BCD Packed Decimal (a form of BCD) dd dd … dd ds (always an odd number of digits) d: hex value in range 0 to 9 inclusive s: C (hex) positive (also accepts A, E, and F as positive) D (hex) negative (also accepts B as negative) (sign is always in right-most byte)
8
End of Lecture
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.