4 bit propositional logic
4 bit logic
We know from basic proposition logic,
That 0&0=0, and 0|1=1.
Now let's try 4 bit logic basics.
In written form:
0=0
1=1
2=2
3=3
We know the basics:
0&0=0
0&1=0
1&0=0
1&1=1
Now for &:
2&0=0
2&1=0
2&2=2
2&3=3&2
3&2=2&3
3&0=0
3&1=0
3&2=2&3
3&3=3
--
Now for or denoted by | (inclusive):
0|0=0
0|1=1
1|0=1
1|1=1
2|0=2
2|1=1|2
2|2=2
2|3=3|2
3|0=3
3|1=1|3
3|2=2|3
3|3=3
--
Lets denote exclusive or with /
0/0=0
0/1=1
1/0=1
1/1=0
2/0=2
2/1=1/2
2/2=0
2/3=3/2
3/0=3
3/1=1/1
3/2=2/3
3/3=0
--
Now for not:
!0=1|2|3
!1=0|2|3
!2=0|1|3
!3=0|1|2
--
If then denoted by >
0>0=1
0>1=1
1>0=0
1>1=1
Then:
0>2=0|1|3
0>3=0|1|2
1>2=0|1|3
1>3=0|1|2
2>0=0|1|3
2>1=0|2|3
2>2=0|1|3
2>3=0|1|2
3>0=1|2|3
3>1=0|2|3
3>2=0|1|3
3>3=1|2|3
So lets do a little comparison on first glance:
ReplyDelete0>2=2>0
3>0=3>3
and
0>3=1>3=2>3
Etc.
I have a feeling this logic will make computer's (cpu's) twice as fast at the cost of twice the memory (ram).
ReplyDeleteAlso it could be improved to 8 bit logic to make current cpu's 4 times as fast at 4 times the cost of ram.
There is a meta-logic to this logic which I hope to write about. It should expand to maximum available ram, with maximal attainable speed.
Economically it doesn't make much sense, but speed increase does not follow Moore's Law anymore, so its worth a shot.
Delete