Unsigned binary arithmetic goes back at least to the 704 in 1955. I suspect 
that it goes back farther. There was no concept of halfword at the time; it was 
all 36-bit words.

Logical AND, OR, etc. have comparable antiquity.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3

________________________________________
From: IBM Mainframe Assembler List [[email protected]] on behalf 
of Schmitt, Michael [[email protected]]
Sent: Thursday, June 16, 2022 10:36 AM
To: [email protected]
Subject: When did logical instructions appear?

My company's COBOL coding standards are* to define binary fields as signed 
(e.g. PIC S9(4) BINARY). I'm wondering why that's the standard.

The original standards were developed at least 40-60 years ago. They were 
revised in 1994 but the signed binary guidance remained.

One explanation could be if 50 years ago there were only signed binary 
instructions such as ADD, but not logical instructions such as ADD LOGICAL. Or 
maybe there were some logical instructions but not the full complement we have 
today.

Or it could be that whatever version of COBOL was used then (OS/VS COBOL or 
earlier) was more efficient with signed binary, such as due to the choices it 
made in instruction selection.

So my question is, roughly when did the machines get unsigned binary 
instructions for halfwords and fullwords?


* "are" isn't the right word here, since the COBOL coding conventions are no 
longer published anywhere. I only know what they are because I was on the team 
that reviewed the 1994 revision, and have a copy saved.

Reply via email to