Section 2.0

The Orion Word

In Orion the word (the content of one register or drum location) is 48 bits long. These binary digits are numbered from 0 (the most significant) to 47 (the least significant). Within the working store and on the drum a 49th bit is attached for parity checking. This parity bit is not accessible to the programmer.

The programmer may interpret words in many ways, the most common of which are described below.

2.0.1   The word as an instruction

Each machine instruction occupies the whole of one 48-bit word. The bits in the stored instruction are allocated as in the diagram and table below.


1

7


1


15

2


6


1


15

4

3

1

1

 S

F

 TX

X

R

Z

 TY

Y

G

P RX RY

 

 

Symbol Bits Significance
S D0 Signal bit: if zero the instruction may not be obeyed:  see section 5.2 page 2
F G
P
D1 to D4
D5 to D7
Function F, group G (0 to 15), position in group P (0 to 7)
TX D8 Type (X).  1 if X-address is to be modified by zm, or if instruction is of unmodified 2-address type
X D9 to D23 X-address;  0 to 32767
R RX
RY
D24
D25
1 if X-address is to be replaced
1 if Y-address is to be replaced
Z D26 to D31 Z-address; 0 to 63 (0 if a instruction of unmodified 2-address type)
TY D32 Type (Y).  1 if Y-address is to be modified by zm
Y D33 to D47 Y-address;  0 to 21767

 

2.0.2 The word as a number.

Regarded as a number, a word may be interpreted in several different ways.

a) A Fixed-Point Integer

When a word is interpreted in this way, D0 is a sign bit; 0 if the number is non negative and 1 if the number is negative. Integers are held exactly: a single 48-bit word can represent any integer in the range:

-247 ≤ xI ≤ 247-1 = 140,737,488,355,327
                       ≈ 1.4 x 1014

A negative integer is represented by its complement with respect to 248.

b) A Fixed-Point Fraction

When a number is regarded as a fraction, the sign of the fraction is given by the m.s. bit, in the same way as with integers. A single-length word can be regarded as a "fraction" within the range

-1.0 ≤ xF ≤ 1.0 – 2-47

its value being an integral multiple of 2-47. (Note also that xF = εxI, where ε = 2-47). A negative fraction is represented by its complement with respect to 2.

If it is required to store, single length, a fraction which is not an exact multiple of 2-47, the number which is actually stored is the required fraction rounded to the nearest multiple of 2-47, or to the numerically greater multiple of 2-47 if the required number is an odd multiple of 2-48.

c) A Fixed Point mixed number

Since the binary point has significance only to the programmer, and not to the computer, it follows that the programmer can imagine the binary point to be in any desired position.  In general, therefore, the binary point can be considered to be n places up from the l.s. end, i.e. between D(47-n) and D(48-n).  Then, with D0 as the sign bit, the (47-n) bits D1 to D(47-n) may be used to represent an integral part, and the n bits D(48-n) to D47 may be used to represent a fractional part, permitting storage of mixed numbers such as +10.7, -1257.813 etc.  Denoting the value of a word regarded as a mixed number, by xs it can be expressed as

xs = xI 2-n = xF.2(47-n)

It is an integral multiple of 2-n and lies within the range

–2(47-n) ≤ xs ≤ 2(47-n) – 2-n

(As an alternative to imagining the number as being stored with the binary point somewhere along the word, it can be regarded as being stored as the integer or fraction which represents the mixed number multiplied by a suitable scaling factor; thus

xI = xs.2n  and  xF = xs.2-(47-n)

A particular case of the mixed number is the single-length mid-point number with n = 24. (223 = 8,388,608).

d) A Floating-Point Number

To represent a number in standard floating-point form in Orion, the 48-bit word is divided into two fields. The first field, D0 to D39, represents the signed fractional argument of the number, and bits D40 to D47 represent the non-negative "characteristic". The signed integer equal to the characteristic minus 128 is the exponent of the floating-point number; the complete floating-point number has the value 

The argument is zero or lies within one of the ranges ½ ≤ xa < 1 or -1 ≤ xa < -½, depending on its sign, and the exponent lies within the range -128 ≤ xe ≤ 127. Floating-point numbers have about 11 or 12 significant decimal digits; the largest numerical value representable in this way has a magnitude of about 1038.

e) Double-Length Numbers

If the contents of two consecutive registers are regarded as parts of a single number, that number is known as a double-length number. (In general, the full product of two single-length numbers is a double-length number.)

A convention normally adopted is that the m.s. bit of the second (l.s.) word is zero, the d.l. number is then said to be in 'standard form'. Regarded as a single-length number, the l.s. word is therefore non-negative. As with single-length numbers, the binary point may be imagined to be in any desired position.

The instruction with function number 126 is specifically designed for use with double-length numbers.

i) Double-length integers

Let the values of the m.s. and l.s. words, regarded as single-length integers, be xI and xI* respectively. Then the value of the double-length integer formed from xI and. xI* is x:I = xI.247 + xI* and lies within the range -294 ≤ x:I ≤ 294-1 [294 ≈ 1.98 x 1028] if it is in standard form (i.e. with xI* non-negative).

The principal advantage of using double-length integers lies in the increase in the permissible magnitude of the number which can be stored.

ii) Double-length fractions

If xF and xF* are the values of the individual words regarded as single length fractions, the value of the double-length fraction is x:F = xF + εxF* where ε = 2-47.  If it is in standard form, a double-length fraction lies within the range -1.0 ≤ x:F ≤ 1.0 - 2-94 and is an integral multiple of 2-94

x:F = x:I.2-94

Use of double-length fractions increases the precision to which a general fraction can be represented in the computer.

iii) Double-length mixed number

By considering the binary point to be at some arbitrary position in the double-length number, mixed numbers can be held in double-length form.  Let the binary point be m places up from the extreme right hand end of the double-length number.  Then if m ≤ 47, the value xs of the double-length mixed number is x:s = x:I.2-m

It lies within the range -2(94-m) ≤ x:s ≤ 2(94-m) - 2-m and is an integral multiple of 2-m.

If, on the other hand, m >47, the value of x:s is x:s = x:I.2-(m-1) and lies within the range -295-m ≤ x:s ≤ 295-m – 2-(m-1)

The difference between the cases m ≤ 47 and m > 47 arises from the special treatment of the sign-bit of the second (l.s.) word in double-length working.

A particular case is when m = 47 or 48 (these two cases are equivalent, from the discussion above).  The binary point is then, effectively, between the two words; the m.s. word is then regarded as an integer and the l.s. word as a (usually non-negative) fraction.  In this form, known as standard double-length mid-point representation, the number has the value x:M = xI + xF*

The range of values is –247 ≤ x:M ≤ 247 –2-47 and the stored number is an exact multiple of 2-47.

Double-length mid-point numbers arise naturally as the full d.l. product (produced in Orion by the 32-function) of an integer and a fraction.  Double-length mid-point numbers also arise as the quotient given by the 42-instruction.

(iv) Double-length floating-point numbers

If two consecutive words are used to store the standardized fractional argument, and a third word is used to store the exponent, then floating-point numbers can be stored with greater precision and with a larger range of exponents than can be attained with the standard packed (single-word) floating-point form.

The double-length argument is standardised to be zero or to lie, usually, within one of the ranges ½ ≤ x:F < 1 or –1 ≤ x:F < -½ or in special circumstances -½ ≤ x:F < ½

The instruction with function number 125 is specifically designed for standardising numbers in this form.

f) Multiple-length numbers

Any of the number types (integer, fraction, mixed or floating-point) can be stored in more than two words if desired, to increase the possible magnitude and/or precision of the stored number.

The extensions from the double-length form to the general multiple-length form are straightforward and not detailed here (in general only the m.s. word of such a fixed-point number is allowed to be negative).

2.0.3 The word as a set of characters

Generally a character is a numeral, a letter of the alphabet, a symbol (such as + £ / : etc.) or a non-printing character associated with printing layout (space, newline, tabulate, etc.) The 'character' which is stored within Orion is, in fact, an arrangement of bits used to represent that character inside the computer according to some arbitrary code.

One particular code, which is recommended for use whenever practicable, is the Ferranti Flexowriter Code (see Section 0.5).

Normally the internal code is such that each character is represented by a single 6-bit field; eight such fields (characters) can be packed into each 48-bit word. The eight characters in a word are conventionally denoted C0, C1, C2....C7, where C0 is that field comprising bits D0 to D5, C1 occupies D6 to D11..... and C7 occupies D42 to D47.

An alternative notation is to denote the eight characters in the word in register X by x0, x1, ......, x7.

The 6-bit field representing a particular character can be regarded as a 6-bit unsigned binary integer; the value of this integer (0 to 63) is termed the value of the character.

To facilitate the input of characters to Orion, the symbolic input routine allows a line (which may or may not be labelled) on a program sheet to be written in a form typified by 0, 7, 47, 6, 50, 41, 47, 46 i.e. as eight integers in the range 0 to 63 each separated from its neighbours by a comma.  Each of the successive 6-bit fields in the word is set on input to the 6-bit representation of the integer in the corresponding position of the line.  Thus in the above case, the settings will be as follows:

  D0 to D5; 000000 (0)
  D6 to D11; 000111 (7)
  D12 to D17; 101111 (47)
  D18 to D23; 000110 (6)  etc.

In the standard code, those 6-bit fields represent respectively the characters SP, UC, O, LC, R, I, O, N; in effect the computer word represents the English word Orion.

In particular, if this computer word is sent to a 7-track paper-tape punch, and the punched tape is then printed via a Flexowriter, the printing appears as O r i o n , the first letter being preceded by one space.

In certain cases, notably when reading data from punched cards, a computer word is regarded as consisting of eight 6-bit fields, but these fields are not character-representations as described above. Nevertheless it is convenient and conventional to refer to such fields as characters.

Radix-words, associated with the 100- and 101-instructions, (see Section 3.10) are also regarded as being formed of eight 6-bit fields, each of which is sometimes termed a character.  When it forms part of a radix-word, each character is sub-divided into two smaller fields.  The second of these sub-fields, represented by the l.s. 4 bits of the six, is used as a number (0 to 15) in the arithmetical operations of the conversion process.  The 2 m.s. bits which constitute the other sub—field are used to control checking (in the 100- instruction) or to determine the treatment of non-significant zeros (101-instruction).

2.0.4   The word as a set of packed data

It is often necessary to store, and possibly operate on, a number or some other item of data which can be represented by comparatively few binary digits.  Useful economies in storage requirements can be achieved by packing several items of this type into a single word: there are no restrictions on the length of the fields or on the number of fields within a word (subject, obviously, to the limit imposed by the 48-bit word length).

If a field k bits long is used to hold a number, the value of that number (regarded as an integer) lies within one or other of the following ranges:-

  1. if unsigned, 0 ≤ n ≤ 2k -1, or
  2. if signed, with the m.s. bit of the field used as the sign bit, -2k-1 ≤ n ≤ 2k-1 -1

Thus a 7-bit field can represent any unsigned integer in the range 0 ≤ n ≤ 127 or any signed integer in the range –64 ≤ n ≤ 63.

At the programmer's discretion, packed numbers can be interpreted as integers (as above), as mixed numbers or as fractions; in the two latter cases the precision is dictated by the number of bits allocated to the fractional part.  It is expected that packed numbers will normally be regarded as integers.

As stated in section 2.0.3 above, the symbolic input routine recognises lines on the program sheet such as 0, 7, 47, 6, 50, 41, 47, 46 setting each of the successive fields to the 6-bit representation of the written integers.  In fact, each character can be written in other forms.  For example, to set a 6-bit field to the binary equivalent of 47, any of the following written forms may be used:

  1. 47
  2. 32 + 15 (or the sum or difference of any number of integers, basic addresses and/or symbolic addresses, provided that the result is of rank 0 and has the required numerical value, which must be less than 64).
  3. -17 (47 = 64-17, and 26 = 64: the l.s. 6 bits of the binary representation of the (negative) integer are stored).

The Symbolic Input Routine also accepts forms analogous to the above, to permit setting

four 12-bit fields, typically 127, 4095, -7, 100+373

  1. two 24-bit fields, typically 13955, A572.

Note that, in format (b) of these, either or both of the packed quantities may be a working store address, a drum address, or the name (geographical or programmer's) of a peripheral device.  If the word is to be divided into fields of different lengths, the PACKED NUMBERS Directive (q.v.) of Symbolic Input may be used.

Naturally, the data represented by a given field can be non-numerical; the actual significance is assigned by the programmer.  The use of one bit to record the sex of a person is an example of non-numerical packed data.

2.0.5   The word as a logical quantity

When a word is used as a logical quantity, interest attaches principally to the actual configuration of 0-bits and 1-bits within the word. It is usually irrelevant to consider the numerical value of the word, or the characters represented by the 6-bit fields. (Cases do arise when it is convenient to refer to and treat a number or a set of characters as though it were a logical quantity, e.g. when using instruction 123, or when using instruction 56 or 57 to copy two numbers by a single instruction.)

In particular, the m.s. bit of a logical quantity is not regarded as a sign bit, and does not receive the special treatment normally accorded to the sign bit of a numerical quantity (e.g. in the shift instructions).

One of the most common uses of a logical quantity is as a 'mask' as an operand in one of the logical instructions.

The most direct way to set, on input, the content of a word as a logical quantity is to use the MASK directive (q.v,) of Symbolic Input. Using this directive a mask consisting of ten 1-bits followed by twelve 0-bits followed by twenty-six 1 bits could be set on input by the following lines on the program sheet.

MASK 1-10, 0-12, 1-26

NORMAL Such a word may be labelled if desired.

Other means by which a logical quantity may be set on input are by writing it as:-

i)   a pseudo-instruction,
ii)  a number,
iii) a set of characters.

The contents of two consecutive registers may be regarded as combined to form a double-length logical quantity. The m.s. bits of the two words are not regarded as sign bits; in particular, the m.s. bit of the l.s. word is not necessarily zero, i.e. there is no "standard form" as there is with double-length numerical quantities. The instructions 56, 57 and 123 are designed specifically for operations with these double-length logical quantities