XXIIVV

-0+

A computer with word-sizes that should be measured in trits, not bits. We will use a 3-trit trybble, a 9-trit tryte, and a 27-trit word. Kleene logic augments the conventional true and false of Boolean logic with a third value, unknown.

Truth valueUnsignedBalancedBCB
false0-11
unknown1000
truth2+01

Binary-coded Balanced

Binary-coded balanced(BCB) is a representation allowing binary computers to manipulate ternary data. In ternary, one trit encodes 3 values. As such, if we use 2 bits per binary-encoded ternary trit.

UnsignedBCBBalanced
Dec.Tern.Tern.Dec.
0001111---4
1011100-0-3
2021101-+-2
31000110--1
4110000000
51200010+1
6200111+-2
7210100+03
8220101++4

The advantage of BCB over Douglas W. Jones's BCT is that it makes detecting carry easier, due to 1+1=2 and 2+0=2 giving the same result, whereas if you add two values that are 0, 1, and 3 you will never get the same sum two different ways. To convert to the unsigned form, you can do (x+1)>>1, and the reverse (x>>1)|x.

Balanced Trite
tri-0+
bc1110001
int-101
Balanced Trybble
try---000+++
bc3111111000000010101
int-1300013

incoming heptavintimal