Binary Number Systems and Packed Decimal Format - Prof. Edward Bosworth, Quizzes of Programming Languages

The topics of two's complement binary numbers, packed decimal format, and ibm s/360 addressing. It includes examples of converting two's complement binary integers, understanding ebcdic codes, and base register/displacement addressing. A quiz is scheduled for january 28th.

Typology: Quizzes

Pre 2010

Uploaded on 08/04/2009

koofers-user-js7
koofers-user-js7 🇺🇸

10 documents

1 / 5

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Topicfortonight.
1.Two'scomplementbinarynumbers
2.Packeddecimalformat
3.IBMS/360FloatingPointFormat
4.IBMS/360BaseRegister/Displacement
Addressing
QuizonMonday1/28.
32bittwo'scomplementbinaryinteger.
Largestvalue:2^311
Smallestvalue2^31
12bitunsignedinteger:0to2^121or0to4095
32bitsarethesameas8hexadecimaldigits
12bitsarethesameas3hexadecimaldigits.
Title:Jan237:24PM(1of5)
pf3
pf4
pf5

Partial preview of the text

Download Binary Number Systems and Packed Decimal Format - Prof. Edward Bosworth and more Quizzes Programming Languages in PDF only on Docsity!

Topic for tonight.

**1. Two'scomplement binary numbers

  1. Packed decimal format
  2. IBM S/360 Floating Point Format
  3. IBM S/360 Base Register/Displacement Addressing**

Quiz on Monday 1/28.

32bit two'scomplement binary integer. Largest value: 2^31 1 Smallest value 2^

12bit unsigned integer: 0 to 2^12 1 or 0 to 4095

32 bits are the same as 8 hexadecimal digits 12 bits are the same as 3 hexadecimal digits.

Examples of 2's comp: eight bit (2 hex digits)

Take the two's complement of 0x4F Convert to binary: 0100 1111 One's Comp: 1011 0000 Add one: 1011 0001 The 2's comp: B 1 0xB

What is +102 as a two's complement 8bit binary integer.

102 = 64 + 32 + 6 = 64 + 32 + 4 + 2 = 0110 0110

What about 23. 23 = 16 + 7 = 16 + 4 + 2 + 1 10111 Expand to 8 bits 0001 0111 One's comp: 1110 1000 Add one: 1110 1001 0xE

019972532C

Base Register/ Displacement Addressing

four hexadecimal digit. The leftmost digit is the register number The next three hex digits are the 12bit displacement.

The displacement is always nonnegative; an unsigned integer.

3AF0 Register 3 Offset is AF0 10256 + 1516 + 0 = 2800

If register 3 contains 40000, the address is 42800.