---
title: Hybrid Unary-Binary Architecture
url: https://www.emergentmind.com/topics/hybrid-unary-binary-architecture
type: topic
---

# Hybrid Unary-Binary Architecture

Hybrid unary-binary architecture denotes a class of computational organizations in which selected signals, operands, or layers are encoded in unary form, while subsequent computation remains in compact fixed-point or positional binary form. Across the literature, this arrangement is used to preserve unary arithmetic’s hardware simplicity—such as bitwise-AND multiplication, gated accumulation, counting, or direct thermometer-code consumption—without inheriting the long bit-streams, routing expansion, and control overhead of pure-unary systems, and without paying the full multiplier and interface cost of conventional binary datapaths [2509.15316][2412.17955][2412.19002][2012.09912].

## 1. Conceptual basis and motivation

Hybrid unary-binary designs arise from a recurring hardware tension. Conventional bit-parallel binary implementations provide low latency, but they require multi-bit multipliers, adders, and multi-bit routing. Unary computing simplifies arithmetic substantially, yet it often exchanges circuit complexity for temporal length. The resulting architecture therefore places unary encoding only where it offers a decisive structural advantage, and retains binary representation where compactness and accumulation efficiency are more important.

In printed electronics (PE), the motivation is especially explicit. PE systems suffer from large feature sizes, low integration density, and tight power/area budgets. Standard binary MLP implementations require multi-bit multipliers and adders, area- and power-hungry flash ADCs followed by binary-to-unary or binary-to-thermometer encoders for sensor interfaces, and conventional digital routing of multi-bit words. Unary arithmetic offers extreme hardware simplicity: multiplication by bitwise-AND, addition by simple bit-counts or OR trees, and direct sensor-to-unary mapping if the ADC already produces a thermometer code. Its two stated drawbacks are very long bit-streams to achieve reasonable precision and the fact that serial or temporal formats incur multi-cycle operation and heavy control logic, including registers and counters [2509.15316].

A closely related motivation appears in matrix-multiply accelerators. General Matrix Multiplication (GEMM) dominates DNN inference and training time. Traditional bit-parallel MAC engines deliver low latency at the cost of high area and power, whereas unary computing trades parallelism for time. The hybrid temporal-unary/binary formulation used in tubGEMM preserves unary simplification for one operand while keeping the other operand in conventional binary, with exact arithmetic rather than stochastic approximation [2412.17955].

In convolution accelerators, the same design logic is visible in Tempus Core. Unary-based PE arrays are presented as area-power efficient, but their practical adoption depends on compatibility with existing DLA dataflow. Tempus Core therefore uses tub multipliers that maintain NVDLA dataflow compliance while leveraging temporal-unary behavior for efficiency [2412.19002].

A broader representational perspective appears in unary positional encoding. That work frames hybridization not only as a circuit partitioning strategy but also as a number-representation strategy: unary contributes flat error tolerance, while positional encoding contributes compactness. This suggests that hybrid unary-binary architecture is not restricted to MAC arrays; it can also be understood as a general design principle for balancing robustness, compactness, and implementation cost [2012.09912].

## 2. Representations and arithmetic models

A central unary representation in the printed-classifier design maps normalized inputs $x \in [0,1]$ to an $N$-bit unary word $u=(u_1 \ldots u_N)$ according to

$$
u_i =
\begin{cases}
1, & i \le \lfloor N\,x \rfloor,\\
0, & \text{else.}
\end{cases}
$$

The corresponding real-valued estimate is

$$
\hat{x} = \frac{1}{N}\sum_{i=1}^{N} u_i.
$$

This is a fully parallel unary representation rather than a temporal stream. In the PE setting, that distinction is important because the input can be taken directly from a flash ADC in thermometer code and presented as a unary word without encoder overhead [2509.15316].

Temporal-unary variants encode magnitude over cycles rather than space. In tubGEMM, an unsigned value $x \in [0, 2^b-1]$ is encoded in ordinary temporal-unary form as

$$
U_1(x) = 1^x \cdot 0^{(2^b-1)-x}.
$$

To reduce latency, tubGEMM introduces twos-unary encoding. Writing

$$
x = 2\cdot \lfloor x/2 \rfloor + (x \bmod 2),
$$

it defines

$$
U_2(x) = 1^{\lfloor x/2 \rfloor}\cdot 0^{2^{b-1}-\lfloor x/2 \rfloor},
$$

and emits an odd flag in the final cycle iff $x$ is odd. The processing element adds the binary operand once per unary cycle, corresponding to multiplication by $2$, plus one additional addition when the odd flag is set [2412.17955].

Tempus Core uses a directly analogous 2s-unary formulation for convolution. A parallel INT-$w$ feature value $F$ is encoded into a bit-serial stream $s(t)\in\{0,2\}$ over $M$ cycles, where $M=2^{w-2}$ in the worst case and

$$
\sum_{t=0}^{M-1} s(t) = F.
$$

With a binary weight $W$, the PE performs

$$
\text{partial}(t+1)=\text{partial}(t)+s(t)\cdot W,
$$

so that after $M$ cycles

$$
\text{partial}(M)=\sum_{t=0}^{M-1} s(t)\cdot W = F\cdot W.
$$

The result is exact multiplication, but with a multi-cycle realization [2412.19002].

Unary positional encoding generalizes hybridization at the representational level. For unary length $n$ and number of streams $k$, any integer value $V$ in the range $0 \ldots n^k-1$ is represented by $k$ parallel unary streams, each weighted positionally:

$$
V = \sum_{i=0}^{k-1} \left(\sum_{j=0}^{n-1} x_{i,j}\right)\cdot \text{base}^i,
\qquad x_{i,j}\in\{0,1\}.
$$

In the temporal-rate spiking realization, the decoded value is

$$
V = \sum_{i=0}^{k-1} N_i \cdot \text{base}^{(k-1-i)}.
$$

Here unary coefficients are conveyed by spike counts or rate, while stream weights are conveyed by temporal order. The formulation explicitly trades between unary and positional extremes in latency and error sensitivity [2012.09912].

## 3. Printed-machine-learning realization

The most explicit hybrid unary-binary architecture in the provided literature is the printed MLP classifier proposed for multiplier-less PE implementation. Its defining decision is to keep the first, input layer in fully-parallel unary form and to convert to compact fixed-point binary after that layer. The stated purpose is twofold: removing costly binary encoders by exploiting direct flash-ADC-to-unary mapping, and ensuring that deeper layers use standard adders and comparators with very few multipliers or only power-of-two shifts [2509.15316].

The high-level datapath is:

**Sensor $\rightarrow$ Flash ADC (thermometer code) $\rightarrow$ Unary-encoded input word $\rightarrow$ Unary multiplier bank (bitwise-AND/route) $\rightarrow$ Index-to-binary converter $\rightarrow$ Binary accumulator $\rightarrow$ ReLU $\rightarrow$ Subsequent binary layers $\rightarrow$ Comparator tree $\rightarrow$ Class output**

The major components are specialized to that partitioning. The Unary Input Generator takes an $N$-bit thermometer code directly from a flash ADC and presents it as a parallel unary word. The Unary Constant Multiplier Bank instantiates, for each hidden-layer neuron, a bank of $N$ AND gates or direct wires that combine unary input bits with hard-wired unary weight bits; zeros in the weight vector remove AND gates entirely. Index/Count Extraction then uses the positions of ones in the $N$-bit result to drive a small binary adder or indexed accumulator, i.e., the count of ones is the dot-product result. After that, Binary Accumulator & ReLU convert the computation into fixed-point binary, and the Hidden/Output Layers use standard binary logic, concluding with a small comparator tree [2509.15316].

This organization is hybrid in a strong architectural sense rather than merely representational. Unary is used only where PE hardware benefits directly from sensor-interface alignment and multiplier elimination. Binary is used where network depth would otherwise amplify unary overhead. The paper’s discussion identifies this partition as a sweet spot: thermometer-to-unary for inputs, binary thereafter. A plausible implication is that the architecture treats unary not as a universal replacement for binary arithmetic, but as a localized substrate for the most interface-dominated portion of the computation.

## 4. Multiplier-less execution and architecture-aware training

In the printed MLP, first-layer multiplication is reformulated as unary coincidence counting. For $x,w\in[0,1]$, with unary encodings $u_i$ and $v_i$, the dot-product

$$
y = x \cdot w
$$

is approximated by

$$
y \approx \frac{1}{N}\sum_{i=1}^{N}(u_i \wedge v_i).
$$

The logic interpretation is direct. If $v_i=0$, the corresponding AND gate is eliminated entirely; if $v_i=1$, the input bit is passed directly to the count. The design therefore removes any conventional multi-bit multiplier in the first layer. First-layer weights are converted offline into unary constant bit-patterns of length $N$ and hard-wired in the PE fabric [2509.15316].

The deeper binary layers are then optimized by architecture-aware training. Each weight $w$ is quantized to its nearest power-of-two value $2^{-k}$. After one such quantization step, that layer alone is retrained for $m=2$ epochs while all other layers are fixed, and classification accuracy is measured. If the drop exceeds a preset threshold $T$, the quantization is rolled back. The procedure repeats until no further quantization is possible without violating accuracy. The paper states that no new loss function is introduced, but that the process effectively enforces a hard regularization on weights so that the final model uses a large fraction of power-of-two weights, minimizing real multipliers [2509.15316].

This combination of unary first-layer execution and power-of-two binary deeper-layer execution explains the paper’s description of the classifier as multiplier-less. In the first layer, multiplication reduces to AND-plus-count. In later layers, conventional fixed-point multiplies are largely replaced by wiring when weights are quantized to powers of two, so each multiply reduces to a fixed shift or even a direct wire. The term therefore refers to the removal or near-removal of conventional multi-bit multipliers, not to the absence of arithmetic accumulation.

## 5. Quantitative behavior across representative implementations

The empirical literature shows that hybrid unary-binary design is primarily evaluated through area, power, energy, latency, and accuracy trade-offs. The reported effects vary strongly with domain, precision, and whether unary is spatial/parallel or temporal/serial.

In printed classifiers, the baseline consists of exact 3-bit input/5-bit weight parallel binary MLPs, with average area $7.2\ \mathrm{cm}^2$ and average power $24.1\ \mathrm{mW}$. The hybrid unary-binary design without power-of-two training reports average area reduction of $25\%$, average power reduction of $24\%$, and average accuracy loss of $2\%$, with accuracy loss $\le 3\%$ on all but one dataset. Enabling power-of-two training adds $8.5\%$ area gain and $7.9\%$ power gain with additional accuracy loss $<0.6\%$. Against approximate binary state-of-the-art, the full design achieves on average $46\%$ lower area and $39\%$ lower power for $<5\%$ maximum accuracy drop across six UCI datasets: Cardio, RedWine, WhiteWine, Seeds, Vertebral, and Balance Scale. The discussion states that all operations are fully parallel, producing one inference per cycle at $20\ \mathrm{Hz}$ [2509.15316].

In tubGEMM, the key comparison is against uGEMM. For 16×16, 8-bit, 45 nm, the reported figures are $0.77\ \mathrm{mm}^2$, $0.20\ \mathrm{W}$, $0.64\ \mu\mathrm{s}$, and $0.13\ \mu\mathrm{J}$ for uGEMM, versus $0.086\ \mathrm{mm}^2$, $0.025\ \mathrm{W}$, $2.65\ \mu\mathrm{s}$, and $0.066\ \mu\mathrm{J}$ for tubGEMM. This corresponds to approximately $89\%$ area savings, $87.5\%$ power savings, and $50\%$ energy savings, with increased latency. At 5 nm for a 128×128 array, the 8-bit design reports $0.2217\ \mathrm{mm}^2$, $417.7\ \mathrm{mW}$, $21.2\ \mu\mathrm{s}$ worst-case latency, and $8.856\ \mu\mathrm{J}$ worst-case energy; lowering precision to 4 and 2 bits further reduces area, power, and energy. The paper also reports that typical sparsity in MobileNetv2 and ResNet-50 reduces energy by more than $3\times$ [2412.17955].

In Tempus Core, post-synthesis INT8 single-cell results at 45 nm and 250 MHz report binary cell area $0.4334\ \mu\mathrm{m}^2$ and power $12.20\ \mathrm{mW}$ versus tub cell area $0.0355\ \mu\mathrm{m}^2$ and power $1.06\ \mathrm{mW}$, i.e., area reduction $91.8\%$ and power reduction $91.3\%$. For an INT8 16×16 PE array, binary area is $0.090\ \mu\mathrm{m}^2$ and power $3.80\ \mathrm{mW}$, while tub area is $0.018\ \mu\mathrm{m}^2$ and power $1.42\ \mathrm{mW}$, i.e., area reduction $80\%$ and power reduction $62\%$. At the unit level, the PE Cell Unit yields $59.3\%$ and $15.3\%$ reductions in area and power consumption, respectively, over NVDLA’s CMAC unit for INT8 precision. Because the PE is smaller, the paper reports $5\times$ and $4\times$ iso-area throughput improvements for INT8 and INT4 precisions [2412.19002].

| Design | Setting | Reported result |
|---|---|---|
| Printed hybrid MLP | Six UCI datasets | $46\%$ lower area, $39\%$ lower power, $<5\%$ maximum accuracy drop |
| tubGEMM | 16×16, 8-bit, 45 nm vs uGEMM | $89\%$ smaller area, $87\%$ lower power, $50\%$ lower energy |
| Tempus Core | INT8 PCU vs NVDLA CMAC | $59.3\%$ lower area, $15.3\%$ lower power |

Taken together, these results indicate that hybrid unary-binary architectures do not have a single fixed performance profile. In fully parallel printed-classifier form, they can preserve one-inference-per-cycle behavior. In temporal-unary GEMM and convolution form, they usually exchange latency for area and power. This suggests that the benefit is architecture-dependent rather than intrinsic to the representation alone.

## 6. Variants, trade-offs, and recurring misconceptions

Several distinct hybridization patterns appear in the literature. The printed MLP keeps the first layer in fully parallel unary form and converts to binary afterward. tubGEMM streams one operand in temporal-unary form and keeps the other in binary, using a gated accumulator for exact arithmetic. Tempus Core uses a bit-serial temporal-unary datapath for activations and a compact binary datapath for weights, while preserving the NVDLA inner-product convolution loops. Unary positional encoding combines unary counts with positional weighting, and in spiking form uses timing for stream position and rate for unary coefficient [2509.15316][2412.17955][2412.19002][2012.09912].

One common misconception is that unary or hybrid unary-binary computing is necessarily approximate or stochastic. The data do not support that generalization. tubGEMM is explicitly described as exact, not approximate, GEMM, and Tempus Core derives exact equality between accumulated temporal-unary products and binary multiplication. By contrast, the printed MLP’s first-layer dot-product is written as an approximation because unary encoding represents real values through finite-length counts [2412.17955][2412.19002][2509.15316].

A second misconception is that hybridization always removes latency penalties. The literature presents a more conditional picture. The printed PE classifier is fully parallel and produces one inference per cycle at 20 Hz. However, tubGEMM latency scales with unary pulse length $N_u = 2^{b-1}$ per outer step, and Tempus Core uses worst-case tub cycle count $M = 2^{w-2}$, which is higher than one-cycle binary MAC. The gain is therefore often area-power efficiency rather than absolute latency [2509.15316][2412.17955][2412.19002].

A third misconception is that hybrid unary-binary architecture automatically implies programmability. In the printed MLP, the methodology assumes hard-wiring of unary weights after offline conversion; the paper states that fully programmable PE would reintroduce encoders. This restriction is not present in the same form in tubGEMM or Tempus Core, where the hybridization is tied to streamed operands and PE-array organization rather than hard-wired unary constants [2509.15316][2412.17955][2412.19002].

The trade-offs are stated explicitly in several works. The printed-classifier paper identifies a sweet spot between pure-unary and pure-binary: pure-unary would bloat bit-streams, whereas pure-binary would incur large multipliers and ADCs. Tempus Core states that hybrid unary-binary convolution wins in ultra-area-constrained designs, at very low precision, or under high sparsity and low dynamic range, but that pure binary wins in low-sparsity, higher-precision regimes and when latency-critical one-shot operations are required. Unary positional encoding similarly presents a bounded intermediate point between unary’s worst-case error of $\pm 1$ and pure binary’s exponential sensitivity to MSB error [2509.15316][2412.19002][2012.09912].

A plausible implication is that “hybrid unary-binary architecture” is best understood not as a single canonical circuit template but as a family of representation-placement strategies. What remains invariant is the design rule: unary encoding is introduced only where it collapses expensive arithmetic or interface logic, while binary encoding is preserved where depth, accumulation, storage, or routing favor compact positional representation.

Source: https://www.emergentmind.com/topics/hybrid-unary-binary-architecture