Dismiss
InnovationQ will be updated on Sunday, Oct. 22, from 10am ET - noon. You may experience brief service interruptions during that time.
Browse Prior Art Database

Programming Method of Expanding One Byte to Eight for Binary Printout

IP.com Disclosure Number: IPCOM000075686D
Original Publication Date: 1971-Oct-01
Included in the Prior Art Database: 2005-Feb-24
Document File: 1 page(s) / 11K

Publishing Venue

IBM

Related People

Drewry, DP: AUTHOR

Abstract

When it is desirable to display the individual bits of a byte, each bit must be represented by a full byte for writing to an output device. An efficient means of accomplishing this is described in the following procedure, showing a sample byte containing hexadecimal B6 (Binary 10110110): Step 1 - The subject byte is propagated through an eight byte field. Result: B6 B6 B6 B6 B6 B6 B6 B6 Step 2 - All bits are forced to zero except the first bit of the first byte, the second bit of the second byte, and so on through the eighth bit of the eighth byte. If these bits are on, they are left on. This can be done with an AND operation. Result: 80 00 20 10 00 04 02 00 Step 3 - The four leftmost bytes are shifted one-half byte to the right, to permit the use of a very short translate table in the final step.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 100% of the total text.

Page 1 of 1

Programming Method of Expanding One Byte to Eight for Binary Printout

When it is desirable to display the individual bits of a byte, each bit must be represented by a full byte for writing to an output device. An efficient means of accomplishing this is described in the following procedure, showing a sample byte containing hexadecimal B6 (Binary 10110110): Step 1 - The subject byte is propagated through an eight byte field. Result: B6 B6 B6 B6 B6 B6 B6 B6 Step 2 - All bits are forced to zero except the first bit of the first byte, the second bit of the second byte, and so on through the eighth bit of the eighth byte. If these bits are on, they are left on. This can be done with an AND operation. Result: 80 00 20 10 00 04 02 00 Step 3 - The four leftmost bytes are shifted one-half byte to the right, to permit the use of a very short translate table in the final step. A Move with Offset instruction will accomplish this. Result: 08 00 02 01 00 04 02 00 Step 4 - This field is now translated to the desired result using a translate table whose zero position contains F0 and positions one, two, four, and eight contain F1. Result: F1 F0 F1 F1 F0 F1 F1 F0.

After executing just four instructions, the subject byte is ready for display on an output device.

1