Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EDSAC - 17-bit and 35-bit integers

I'm trying to write a program for EDSAC and am stuck on understanding the short and long integer stuff - sometimes I enter something and get a zero, and at others I get a one.

So, for example:

If I enter P0F, 0 is stored.

If I enter P0D, 1 is stored.

If I enter P1F, 2 is stored

If I enter P2D, 3 is stored.

F means use a 17-bit integer, and D means a full length 35-bit integer.

Can someone explain why P0F and P0D don't have the same integer value, just a different bit length?

like image 377
Sam Heather Avatar asked Dec 28 '12 10:12

Sam Heather


1 Answers

I am currently doing an assignment on EDSAC, and from messing around trying to work out how to store constants, I have found that it appears to work as follows:

  • PNF where N is an integer stores the value 2N
  • PND where N is an integer stores the value 2N+1
like image 69
adam Avatar answered Nov 17 '22 13:11

adam