## 2 Second-Order Statistical Modeling of Current-Steering Electronic DACs (eDAC)
### Matrix-Based Modeling of Current-Steering eDACs: From Current Sources to Output Levels
The transposes of the rows of the code matrix \(\mathbf{C}\) are denoted \(\mathbf{b}^{T}[c]\), for \(c=1,2,\ldots,C\) where \(\mathbf{b}^{T}[c]\) is the c-th row of \(\mathbf{C}\) (and \(\mathbf{b}[c]\) is a column vector corresponding to the transpose of the c-th row of \(\mathbf{C}\)). The rows \(\mathbf{b}^{T}[c]\) of \(\mathbf{C}\) are referred to as the \"eDAC codewords\", and the set \(\left\{\mathbf{b}^{T}[c]\right\}_{c=1}^{C}\) of codewords is called the \"eDAC code\". The elements of each code vector \(\mathbf{b}[c]\), as arrayed along the \(c\)-th row of \(\mathbf{C}\), are the linear combination weights applied to the source currents \(I_{S-1},I_{S-2},\ldots,I_{1},I_{0}\) in order to generate the c-th output current level \(J_{c}\). Note: the code matrix \(\mathbf{C}\) of the eDAC (see (1)) is in fact similar to the code matrix \(\mathbf{B}\) for the SEMZM-oDACs and MP-oDACs, as introduced in [14], except that in that work the domain and co-domain of the linear transformation are not current-domains, as in (1), but are rather different physical (photonic) quantities. Nevertheless, both matrices \(\mathbf{B}\) for BIP oDACs in [14] and \(\mathbf{C}\) for BIP eDACs here are \(\pm 1\) valued, notwithstanding the different interpretations of the input and output of the respective linear transformations. The linear transformation (1), applied to the source currents \(S\)-vector, \(\mathbf{I}\), yields the \(c\)-th output current level  
\[J_{c}=\mathbf{b}^{T}[c]\mathbf{I}=[\mathbf{C}]_{c,1}I_{S-1}+[\mathbf{C}]_{c, 2}I_{S-2}+....+[\mathbf{C}]_{c,S-1}I_{2}+[\mathbf{C}]_{c,S}I_{0} \tag{2}\]  
where the matrix elements \([\mathbf{C}]_{c,s}\) are \(01\,1\) for UNIP, \(\pm 1\) for BIP. For UNIP and BIP eDACs, respectively, the output current of the \(c\)-th level is then given by  
\[ \begin{array}{l}J_{c}^{\text{UNIP}}=(0|1)I_{S-1}^{\text{UNIP}}+(0|1)I_{S-2}^ {\text{UNIP}}+....+(0|1)I_{1}^{\text{UNIP}}+(0|1)I_{0}^{\text{UNIP}}\\ J_{c}^{\text{BIP}}\ =\pm I_{S-1}^{\text{BIP}}\pm l_{S-2}^{\text{BIP}}\pm....\pm I_{1}^{ \text{BIP}}\pm I_{0}^{\text{BIP}}\end{array}  \tag{3}\]  
where for BIP eDACs, the signs of the source currents additive contributions are determined by the \(\pm 1\) values in the \(c\)-th row of the matrix \(\mathbf{C}^{\text{BIP}}\), i.e., the bipolar bits of the \(c\)-th BIP codeword, whereas for UNIP eDACs, the \(0\) or \(1\) selection of the source currents additive contributions are determined by the bit values in the \(c\)-th row of the matrix \(\mathbf{C}^{\text{UNIP}}\), i.e., the binary bits of the \(c\)-th UNIP codeword. For a Thermometer Weighted (ThWgt) BIP I UNIP eDAC, the size \(S\) of the source current array (and the length of each codeword vector), equals \(S=C-1\) (with \(C\) the length of the codewords--C is also the output current constellation order). Successive BIP and UNIP codewords have the following forms for ThWgt \(|\) BiWgt eDAC topologies of the UNIP \(|\) BIP polarities:  
\[\mathbf{b}_{\text{BIP}}^{\text{ThWgt}}[c]=\{\underbrace{-1,-1,\ldots,-11,1,...1}_ {C-c\text{ minus}-\text{ones}\,c-1\text{ ones}}\},\quad\mathbf{b}_{\text{UNIP}}^{\text{ThWgt}}[c]=\{ \underbrace{0,0,\ldots,01,1,...1}_{C-c\text{ zeros }\,c-1\text{ ones}}\}. \tag{4}\]  
For a BiWgt BIP eDAC, the size \(S\) of the source current array (and the length of each codeword vector), equals \(S=B\), with \(B=\text{log}_{2}C\) the minimal number of bits specifying the order \(C\) of the output constellation, which is assumed an integer power of 2 (i.e., \(B\) is the eDAC \"nominal-number-of-bits\", e.g., a 3-bit eDAC features C = 8 levels). The \(C=2^{B}\) BiWgt codewords \(\mathbf{b}_{\text{BP}}^{\text{BiWgt}}[c]\) are \(B\)-bit bitstrings forming a \"counting code\", i.e., counting 0, 1, 2, 3, \(\ldots\), albeit in binary base:  
\[\mathbf{b}_{\text{UNIP}}^{\text{BiWgt}}[c]=(c-1)_{\text{base2}} \tag{5}\]  
where \((n)_{\text{base2}}\) denotes the binary representation (bitstring) of the integer \(n\).