Contact us Heritage collections Image license terms
HOME ACL Associates Technology Literature Applications Society Software revisited
Further reading □ ContentsIntroduction0. Introductory exercises1. Basic operations2. Modification, counting and testing3. B-register operations4. Accumulator operations5. Extracode functions6. Input and output operations7. Magnetic tape operations8. Advanced programming techniques9. Complete programs
ACD C&A INF CCD CISD Archives Contact us Heritage archives Image license terms

Search

   
ACLLiteratureAtlas manualsABL Exercises :: ATLAS 1 COMPUTER ABL PROGRAMMING EXERCISES
ACLLiteratureAtlas manualsABL Exercises :: ATLAS 1 COMPUTER ABL PROGRAMMING EXERCISES
ACL ACD C&A INF CCD CISD Archives
Further reading

Contents
Introduction
0. Introductory exercises
1. Basic operations
2. Modification, counting and testing
3. B-register operations
4. Accumulator operations
5. Extracode functions
6. Input and output operations
7. Magnetic tape operations
8. Advanced programming techniques
9. Complete programs

3 B-REGISTER OPERATIONS

SHIFT AND LOGICAL OPERATIONS ON THE CONTENTS OF B-REGISTERS (see Chapter 4)

Exercises

Use only basic codes

Extracodes 1340 - 1344 may be used

Answers

(1a)

     K27
     J7777751

(1b)

     1:1
     3:464

(2a)

     J73700007

(2b)

     J07737

(2c)

     0.2

(3a)

     126     7    0     J77777777

(3b)

     121     7    9     0
     126     7    10    0

(4)

     165     8    9     K360
     1343    8    0     3
     127     6    0     J77741777
     167     6    8     0

(5)

     121     1    30    0
     126     1    31    0
     
     121     2    30    0
     127     2    31    0

(6)

     1344    7    0     23
     1345    7    0     3
     or
     127     7    0     J4
     1343    7    0     4
     or
     216     7    7     0
     217     7    7     1

(7a)

     127     71   0     J37777777

(7b)

     167     71   0     J4

(8)

     165     10   4     K77.7
     165     11   4     J77777
     1344    10   0     3
     1345    11   0     3
     165     4    3     J77
     1344    4    0     12
     124     4    10    0
     124     4    11    0

(9)

     125     80   0     0
     127     80   0     K7777777.6
     164     80   13    K0.1
     1342    80   0     6
(10) 121 1 0 -23 121 2 0 J41) 163 60 0 0 216 127 60 3* 126 60 2 0 126 2 0 J4 203 127 1 A1

(11a)

     127     12   0     K777777
     164     12   13    0.7J7

(11b)

     127     12   0     J7777
     164     12   13    K7777
     1343    12   0     12

(11c)

     127     12   0     K707070.7
     164     12   13    J7070707
(12) 121 1 0 0 121 2 0 0.1 163 2 0 0 211 127 62 2* 167 1 2 0 163 62 0 0 211 127 2 -4* 211 62 1 0

(13)

The following solution is based on the fact that if a ≠ 0 then [a & (a-1)] has exactly one fewer 1 bits than a.

121 31 0 0 214 127 17 4* 124 31 0 1 127 17 17 -0.1 215 127 17 -2*
(14) 121 1 0 10:-0.4 121 41 0 0 101 17 1 40: 214 127 17 4* 127 17 17 -0.1 215 127 17 2* 124 41 0 1 202 127 1 -5*
(15) 121 1 0 -999D1 101 2 1 999D1A29 215 127 2 3* 101 2 1 999D1A77 113 2 1 999D1A29 200 127 1 -4*
(16) 101 31 0 0.4A10 101 30 0 A10 121 1 0 8 104 31 1 1.4A10 1223 30 30 Y1 203 127 1 -2* 121 1 0 8 104 30 1 1A10 203 127 1 -1*
(17) 121 1 0 -Y4 1065 0 0 2.14) 124 1 0 Y4 172 1 0 1: 224 127 0 1A10 101 2 1 10: 121 3 0 75) 1343 2 0 3 165 40 2 Y7 1064 0 40 2 203 127 3 A5 1064 0 0 Y1 165 50 1 Y4 214 127 50 A410) 121 127 0 -1A4 1117 0 0 0Print half wordin octal followedby a spaceArrange for each pairof half words tooccupy a new line
(17) Alternative Solution 1065 0 0 2.1 121 1 0 10:0.72) 126 1 0 Y7 101 2 1 0: 121 3 0 71) 125 2 0 0 163 2 0 0 163 2 0 0 163 2 0 0 165 4 2 Y7 1064 0 4 2 203 127 3 A1 1064 0 0 Y1 211 127 1 A2 1065 0 0 2.1 172 1 0 10:511.7 221 127 1 A2 1117 0 0 0Go back for righthalf-word if bit 23 = 0
(18a) 121 121 0 24D12) 121 122 0 0 202 127 121 A2
(18b) 121 49 0 -23 121 50 0 K0.1 163 50 0 0 113 50 49 23A40 203 127 49 -2*
(18c) 1) +0 121 80 0 0 121 49 0 K0.1 121 121 0 25D12) 113 122 0 A1 163 49 0 0 121 50 49 0 107 50 0 A1 214 127 50 2* 126 80 0 1 172 121 0 48D1 220 127 121 A2
(18d) 1) +0 121 121 0 25D1 123 60 0 13) 124 60 0 1 113 122 0 A1 101 80 0 A1 123 61 0 232) 1345 80 0 1 121 81 80 0 127 81 0 J4 1344 81 60 0 1347 81 61 23A40 201 127 61 A2 172 121 0 48D1 220 127 121 A3

(18e)

The solution may be obtained by placing Gt in the H position as above and then performing the following instructions.

1) +0 121 121 0 1D17) 121 50 0 23 121 51 0 0 113 122 0 A16) 101 49 0 A1 107 49 50 A40 163 51 0 0 214 127 49 4* 126 51 0 J4 127 49 49 -0.1 215 127 49 -2* 203 127 50 A6 124 121 0 24D1 121 122 51 0 122 121 0 24D1 172 121 0 24D1 220 127 121 A7Point at 1st row of FSet count/modifierClear B51 for row of productStore row of FExtract row of FRow of F × Col of GShift down row elementsCount in B51 thenumber of 1s inone row ofresultCycle until row of answer formedTest if last rowIf not, cycle for next row

The elements of the matrix F × G are computed row by row, the elements of each row being computed in reverse order and shifted in from the left. The element ai j is computed as the number of ones, taken modulo 2, in the quantity b(i+1) & (jA40).

A1, B51, B49 are working space.

⇑ Top of page
© Chilton Computing and UKRI Science and Technology Facilities Council webmaster@chilton-computing.org.uk
Our thanks to UKRI Science and Technology Facilities Council for hosting this site