Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined behaviour in BINAC example #3

Open
DestyNova opened this issue Dec 24, 2020 · 1 comment
Open

Undefined behaviour in BINAC example #3

DestyNova opened this issue Dec 24, 2020 · 1 comment

Comments

@DestyNova
Copy link

This whole thing is really fascinating. I noticed that the BINAC instructions specify what to do for IF (A) < 0 and IF (A) > 0, but that leaves the behaviour for (A) == 0 undefined. It might be worth mentioning in the corresponding text, since it's treated as the "otherwise" case. I'd guess that they really meant IF (A) >= 0 there.

@e-n-f
Copy link
Owner

e-n-f commented Dec 28, 2020

Thanks for pointing out the discrepancy. The BINAC documentation is not very clear on what happens when the accumulator contains 0. Given the reference elsewhere to a "sign digit," it sounds like numbers were probably represented in such a way that there were both positive and negative representations of 0, depending on how the 0 happened to have been calculated. The instruction probably looked only at the sign, so 0 could probably go either way depending on the circumstances.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants