Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
https://en.wikipedia.org/wiki/Two%27s_complement
I would argue it is not working as intended. And a NOT function is not a Two's Compliment
https://en.wikipedia.org/wiki/Bit_flipping
In the meantime, or for a different option, you can use SEQZ (Set if EQual to Zero):
For example, 4bit integers:
0 -> 0000
not(0) -> 1111 -> 15(unsigned int) or -1 (signed int)
1 -> 0001
not(1) -> 1110 -> 14(unsigned int) or -2 (signed int)
The only problem is: there is no way to show result as 'unsigned int'. Result is always displayed as 'signed int'. It does not mean result is incorrect.
If the dev's intended to work it in this manner then they've completely messed up their instructions to the user, as they clearly outline that results should be 0 or 1, not 0 or -1 or -2.
I have no problem with "not" working differently in this game than in the rest of the world, but please use the correct ingame definition so that I as a user can use it correctly.
I got some UtilityIC around, these ICs have several different, mostly very simple tasks.i try to keep the programs short, like the tasks they have to fulfil. One of these tasks is to be able to open and close hangar doors using buttons.
And this is was i came up with
"
define Hangardoor -1351081801
define button 491845673
alias HD r9
sb Hangardoor On 1
loop:
yield
lb r0 button Setting 0
blez r0 loop
lb HD Hangardoor Open 0
not HD HD
sb Hangardoor Open HD
sleep 1
j loop
"
it took me about 1h to figure out that it is the "not" command which doesn't work as it says in the deffinition. That was very frustrating ! !
now i use
"select HD HD 0 1"
instead of not
Wow. Okay. I'll try to explain last time.
If you look at any real architecture (x86, MIPS, ARM, etc) you will see chip with set of 'general purpose registers' (there are other registers but i'll skip them for simplicity).
Each general purpose register is ordered set of bits. The size of this set depends on architecture: x86-32 - 32bits, MIPS64 - 64 bits, etc.
In game those r* registers are like real general purpose registers (well, at least for bitwise operations like not,and,xor etc). And these operations (like real world operations) work with full set of bits in those registers. So 'NOT' operation will flip _all_ bits in register (like real 'NOT' operation) and not only bit you are interested in. If you need specific bit - you have to code it.
NOT(0) will give you set of '1' bits: 11...1111. Always. In real world and in game. The number of those '1' bits in register depends on architecture 'width'.
P.S. about program above. There are several ways to correct it. Shortest one is:
change 'not HD HD' to 'sub HD 1 HD'. If you prefer bitwise operations: add after 'not HD HD' 'and HD HD 1' (this 'and' will keep 'interesting' bit and zero all others)
The instructions in the game, however, state they are dealing with a single bit (well, more implied by the example they provide) and is confusing this OP, and plenty of other players, as a search for NOT functionality would reveal in these forums. So while you're correct in the points you are bringing up, they are not to the point made by this OP, but gotta admire your ability to stay focused on your point.
If the intent is to NOT the entire register for user management of data, then that needs to be part of the example provided in their instructions and not just a single bit.
this is my first time trying something with a programming language.
I'm an electronics technician, I understand logic components very well. Everything about this programming revolves around zeros and ones, which suits me very well. If I want to solve a problem, I create a truth table and see which logic corresponds to it. In my case it was just "not" as I know it. Except for the registers, most of the commands qausie revolve around zeros or ones, nothing indicated that it is handled differently in case of "not", not even the ingame definition, and THAT is was is wrong in my opinion.