Docstoc

Bill and Ben

Document Sample
Bill and Ben Powered By Docstoc
					                                        Massey University
                                    159253 (Computer Systems)
                                        Assignment 1 2007

Worth:                20%
Due:                  Friday 27/4/2007
Penalty per day late: 1%

The background
After millenia of conflict, the Lords Of The Universe, as they call themselves (that is,
each of them called himself the Lord Of The Universe; it was very confusing) have been
brought to heel, by the simple process of putting paper bags over their heads.

The idea was an old one – the LOTUI (plural of LOTU) were gradually mechanised as
parts of their bodies failed, and at least five hundred years ago, someone had suggested
that their solar-powered brains could be deactivated by depriving them of light. That
person disappeared in a particularly spine-chilling way (forced to sit in a tub of liquid
nitrogen, and shattered with a hammer into a million tiny pieces when they’d become
sufficiently brittle). As usual, it proved impossible to prove that the LOTUI, individually
or together, (there’s a good deal of evidence to suggest that they cooperate in eccentric
schemes that keep them both in power) were responsible They both have impeccable
alibis. They were each busy with their hobbies. Bill was programming his robot darts
player, and Ben was tinkering with his robot golfer. Previously it had taken an arbitrary
amount of time to take aim before a shot, and he was really getting annoyed with it. So
he’s improved the take-aim mechanism so that now when he sets the take-aim signal, it’s
ready to swing the club within two clock cycles.

For hundreds of years after that, no-one dared to try the Paper Bag Solution, as it was
widely known, on the off-chance that the LOTUI might secretly have had battery-backup
installed some time, and could keep operating for long enough to wreak havoc on the
perpetrator or worse, the perpetrator’s family, and coerce someone to remove the bags.

About a hundred years ago, however, a new theory began circulating amongst the
disaffected. The LOTUI had both recently had massive extensions to their brains, to deal
with administering their new subject-galaxies1 and the battery backup for their brains – if
any – has not been upgraded. Deprived of light, they’d power down before they had a
chance to wreak vengeance. An intrepid adventurer – your aunt Mildred, as it happens –

1
 Bill, the Sirius LOTU, had actually conquered three galaxies, and Ben, the Ursa LOTU, had only
conquered one, but throughout the empire, treason, or at least pragmatism, runs deep, and the military
commanders had done a deal to keep the balance of power, and allocated them two each. And to keep the
running around between galaxies to a minimum, they’d actually given Ben’s new galaxy to Bill, and two of
Bill’s new galaxies to Ben. Neither LOTU noticed.

There are whole branches of the Civil Service (they share the same Civil Service; as it is a given that in any
Civil Service the left hand knoweth not what the right had doeth, LOTUI’s Civil Service doesn’t have to be
any more schizophrenic than usual) allocated to converting the LOTUI’s more extreme commands into
socially responsible actions. Candidates for the Civil Service have to have attained an Honours degree in
Subversion Studies.
was chosen to carry out the raid, which was singularly simple, since all it involved was
going into the room where the LOTUI are housed – they occupy the same room because
of their strange nutritional requirements, which are easier to satisfy if they are co-located
– and popping paper bags over their heads. They’re so taken up with their plotting and
scheming and hurling insults at each other that neither of them noticed your aunt till it
was too late.

The Trial
After five years of confusion, backpedalling and buck-passing following the Paper Bag
Raid, the judiciary finally gathered its courage together and decided it was safe to hold a
trial. Remarkably, the trial was over in about three hours. It took two-and-half hours to
detail the circumstances of the charge, a charge that the LOTUI had themselves
introduced to deal with those whom they saw as traitors – acting under the influence of a
Massively Overinflated Ego, but everyone agreed that the charges were self-evidently
true, and that if the defendants were given a chance to defend themselves, they’d manage
to wriggle out of it somehow, and then everyone who had been associated with the trial
would be for the chop. Then quarter of an hour for a cup of judicial tea (at the Galaxy’s
expense), and then the sentence, which was over in five minutes. The other ten minutes
were just time added on to increase the judges’ fee.

The Sentence
The sentence was bizarre: The LOTUI (they retained their titles) are to remain
permanently in the same room low-light room as each other, each on a toy railway on an
oval track that intersects the other’s track. They have some measure of self-
determination; each can control the direction of travel of his railcar with a clockwise or
anticlockwise signal (or stop by turning off both signals). There are four crossings. At
two of them, Bill is forced to give way to Ben and at two of them, Ben is forced to give
way to Bill. This is in accordance with a social theory that they will learn to act
courteously if forced to act courteously. No-one give it much credence, but it’s the
prevailing rehabilitative theory, so they more or less have to try it.




      Ben gives way                          Bill gives way

                                                                   Ben's track




                           Bill's track
The Biophysical Experiment
A group of special operatives – with plugs in their ears, and no families to threaten - were
detailed to lift the edge of the paper bags slowly to let in increasing amounts of light to
successively activate functions of the LOTUI’s brains till they started issuing orders, and
then back off a little. The operatives measured the light intensity inside the paper bags
and then modified the lighting in the Railway Room so that it duplicated the conditions
they had measured in the paper bag. Fortunately, Bill and Ben turned out to go into non-
megalomaniac mode at the same light intensity, which simplified the design of the room
lighting considerably.

The Appeal
Bill and Ben retained a crack Galactic Counsel as an advocate to appeal the harshness of
the sentence, and the Appeal Court decided that they should be allowed to indulge their
aggressive instincts in a minor and unharmful way, in much the same was as the rest of
humanity. They were to be allowed to batter each other in uncomfortable but ultimately
non-dangerous ways. The court took account of the the fact that neither LOTU was
moving on its little railway. They were both sulking, and had turned off their engines.

Bill‘s weapon of choice is a dart-thrower that throws soft-tipped darts that sting but don’t
do any real damage. Ben, of course, has a mechanical golf club – golf really caught on in
a big way in the Ursa Major solar system about seven thousand years ago, when Ben was
a cub - that can hits practice balls at Bill. They’re soft, but if they’re going fast enough,
they smart when they hit. The two antagonists and their weapons are still on their
elliptical railways, and they can control the direction in which they travel (clockwise or
anticlockwise) and when they stop. Bill, for example, stops at random times (6 times in
65536 clock cycles on average) for a shot. If Bill is also stationary at the time, he takes
aim and shoots (1 clock cycle). Then start moving again in a direction chosen randomly
(probability 0.5 for each direction). If Bill starts moving at any time during this sequence,
Ben starts moving too.

A. Design a combinatorial circuit that can detect when the value of a random 16-bit
number is less than 6. You do not have to generate the random number.
                                                                              [ 5 marks]

B. Design an ASM diagram for a controller that controls the direction of motion of Ben’s
railway (control signals clockwise and anti-clockwise) and controls his mechanised golf-
club (control-signals take-aim, which controls an aiming sub-mechanism that you do not
have to design and swing, which makes the robot swing the club. A new ball will appear
automatically to replace the one that has been hit. Note that you may need to use more
than one random-number generator (which you do not have to design), and that the value-
detection circuits identical to or similar to the one designed in part 1 will be used in
conjunction with the random-number generators
                                                                                   [10 marks]

C. Design an ASM circuit that implements the ASM diagram you designed for part B.
                                                                          [5 marks]

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:0
posted:2/17/2013
language:Unknown
pages:3