Monday, June 13, 2011

Very Reduced Instruction Set

Just how small can a computer instruction set get? 32 instructions? 16?

Well in fact you can get away with just one instruction, subleq, or Subtract if Less Than or Equal To

subleq a,b,c

where the contents of address a are subtracted from the contents of address b, and if the result is not positive jump to address c.

http://en.wikipedia.org/wiki/One_instruction_set_computer

Interesting but not much use you might think. Well consider a computer doing encryption with a secret key. If each different instruction consumes a slightly different amount of power, then by accurately measuring tiny variations in power consumption you might get an idea of which instructions are being executed, and hence you might be able to determine the key. This is a very real problem and such methods are known as side-channel attacks. But if there only is one instruction such attacks are useless.

http://www.iacr.org/workshops/ches/ches2010/presentations/04-Invited_Talk_1/CHES2010-Naccache.pdf

In this talk by David Naccache (who we had over here in DCU giving a talk a few years ago), as you can read here (page 59) some-one has actually built it, and even produced a C compiler for it!

Wednesday, June 8, 2011

Mathematics? What's that?

We are always getting surveyed about one thing or another, but sometimes you wait in vain for some-one to carry out a particular survey. What I am waiting for is for some-one to ask 1000 Irish people, equipped only with pen, paper, a comfortable table and chair, and 10 minutes of time (no calculator allowed), to divide 1104 by 23 and get the right answer. I bet less than 20% could do it.

Actually I take a fairly apocalyptic view of the state of maths in Ireland today. As a nation I reckon there are maybe only a few thousand people left who really understand math. It is gradually being leached out of our national consciousness. Come back in 100 years time, and left to our own devices, knowledge of maths would be entirely gone. Like ancient Harp making, it will disappear, except for a few old text books that no-one will understand. Already we have people teaching maths who don’t understand the subject, to classes who are not surprisingly completely bewildered by it.

In Western countries like America, where the education system is much more variable in quality, but where the average is really rather poor, they are not much better off. But America being America can always suck in know-how from other countries. So America is full of eager and math-literate Indians and Chinese, who will within a generation, (America being America) become as American as Barack Obama. Can we pull off the same trick and simply import math know-how? I don’t think we can, we are not America, and international maths skills will probably not be attracted in sufficient numbers to our shores. So we need to fix our own maths education system, urgently.

However this is a project that will take a generation to complete, and sadly we haven’t even made a serious start on it yet. After a decade of talking about it we are finally getting bonus points for honours maths - starting next year. Glaciers actually move many miles in 10 years so to describe the speed of change here as glacial would be an insult to glaciers.

Then again most other Western countries have the same problem, so if we can get serious about this, and launch a national effort involving all stake-holders, we could still steal a lead over the competition.