ArticleslgStudy

computer science

Sense switch

Sense switch is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Sense switch rather than just read about it. In short: A sense switch, or program switch, is a switch on the front panel of a computer whose state can be tested by conditional branch instructions in software. Most early computers had several sense switches.

Sense switch — main illustration
Sense switch — illustration

Key takeaways

  • Sense switch belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Sense switch to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Sense switch from memory before moving on to harder problems.

Reference excerpt

A sense switch, or program switch, is a switch on the front panel of a computer whose state can be tested by conditional branch instructions in software. Most early computers had several sense switches. They were typically used by the operator to set program options.

IBM's first commercial computer, the IBM 701 Defense Calculator, announced on May 21, 1952, had four lights and six switches on the upper right of its front panel marked Sense (see photo). The switches could be tested and the lights turned on or off under program control. The same number of sense switches and lights were on the front panels of all first and second generation machines in the IBM scientific computer line, the IBM 701, IBM 704, IBM 709, IBM 7090 and the IBM 7094. IBM's Fortran language, first released for the 704, included statements to test the switches and set or reset the lights.

IF (SENSE SWITCH i) n1, n2 SENSE LIGHT i IF (SENSE LIGHT i) n1, n2 where n1 and n2 are statement numbers. SENSE LIGHT 0 reset all four lights. On the IBM 1620 there are four switches, and their state can be tested via special forms of the IF-statement offered by the FORTRAN compiler for the IBM 1620. For the IBM 1130 there are sixteen switches matching the sixteen-bit word size of the computer, plus a toggle switch adjacent to the power on/off switch. These bit-switches are more normally used with the computer stopped to specify some memory address to be viewed (via the indicator lights on the front panel), or set. The state of these switches can be determined by a program, and so a running program might modify its behavior depending on the switches, such as change the amount of progress information printed, alter the tactics of a multi-variable optimization attempt, and so on. The IBM 1130 also has an "Interrupt Request" key associated with the console printer, whose pressing might cause a suitably programmed long-running program to type a progress report on the console printer. In the more usual batch job environment, it was pressed by the computer operator to signal the operating system to terminate a running program that had perhaps overrun its allowed time, or commenced misbehavior such as repeatedly printing blank lines. The front panel of the Data General Eclipse computer has 5 sense switches, 16 address switches, and 5 control switches, as shown (left to right) in the figure at right. Personal computers replace the function of fixed sense switches with the keyboard and screen user interface. A typical running application has two modes: either it has nothing to do and awaits some user action, or, some action is in progress that will take a long time to complete. If a program does not regularly test the state of sense switches during a long calculation, they are ineffective at changing the program's operation.

References

Illustrations

Sense switch: Sense switches and output lights, upper right. on an IBM 701, introduced in 1952
Sense switches and output lights, upper right. on an IBM 701, introduced in 1952
Sense switch: Sense switches on a Data General Eclipse S/130, lower left
Sense switches on a Data General Eclipse S/130, lower left

Worked examples

Example 1 — a first encounter with Sense switch

Start with the simplest possible case. Write down what Sense switch claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Sense switch before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Sense switch ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Sense switch

In research
Sense switch appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Sense switch in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Sense switch is common in secondary-school and first-year university syllabi. It links to neighbouring topics Computer hardware stubs, Early computers, so understanding it makes those chapters shorter.
In everyday life
Look for Sense switch outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Sense switch” →

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Sense switch in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Sense switch means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Sense switch out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Sense switch in simple terms?

A sense switch, or program switch, is a switch on the front panel of a computer whose state can be tested by conditional branch instructions in software. Most early computers had several sense switches.

Why does Sense switch matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Sense switch?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Sense switch.

Tags

  • Computer hardware stubs
  • Early computers

Keep exploring