Integers vs. Long Integers Was: RE: [AccessD] Global Variable

MartyConnelly martyconnelly at shaw.ca
Thu May 19 17:14:04 CDT 2005


Actually Honeywell used both BCD and IEEE floating point arithmetic,
and some of the lower end IBM 360's only came with  standard BCD.
BCD arithmetic is much easier to do than converting to binary and back.
There are well known methods to doing BCD arithmetic
on a basically binary ALU, related to adding 66666666 at the appropriate 
time.
So you could do higher precision in BCD arithmetic on  a 36 bit rather 
than 32 bit machine.

 BCD is neither base 10 nor base 16...it uses 4-bit fields to express
digits between 0-9.   The same as hexadecimal uses 4 bits, but
incrementing a BCD field with the value '9' results in a new BCD number
'10' (8 bits), while incrementing a HEX field with the value '9' results
in the next number 'A' (still 4 bits).
You may also have to determine if your data is stored in big-endian 
(i.e. 12 34 56)
or little-endian  (i.e. 56 34 12).  The width of the field probably has 
to be known
beforehand so you will know where to place the decimal - usually,
mainframe data assumes a decimal place but doesn't actually store it.
The '+' sign is stored as 0xC and the '-' sign is 0xD.
The sign is usually stored at the end (i.e. if you had -123456, then
it would be stored as 01 23 45 6D).



Stuart McLachlan wrote:

>On 19 May 2005 at 9:40, John W. Colby wrote:
>
>  
>
>>Look up octal.  The registers on all the Sperry Univac machines that I
>>learned in the Navy had little neon lights behind plastic buttons with
>>springs in them with switches in them.  Thus each button displayed the value
>>of a bit and the button could be pressed to set the bit when hand
>>programming them.  The registers were "grouped" into 3 bits, each group
>>represented an octal "digit" (which I quote since digit is specifically
>>decimal).  The entire machine, and all of its instructions were documented
>>in octal.  
>>    
>>
>
>But you could only store 8 values in each "digit"
>Look up Byte :-)
>
>  
>

-- 
Marty Connelly
Victoria, B.C.
Canada






More information about the AccessD mailing list