Appendix C
Number systems
Digital circuits all work in binary, where each digit can only take the values of zero or one. Despite this seeming limitation, any arithmetic problem can be solved to any arbitrary level of precision, if enough resources are brought to bear.
In binary numbers, each digit represents a power of two. For a four-digit number, the maximum value will be 15, as the value will be d0 × 20 + d1 × 21 + d2 × 22 + d3 × 23 for digits d0 through d3. If all four are set (logic 1), then the value will be 1 + 2 + 4 + 8, or 15.
Because binary numbers can only take two values per digit, it takes more digits tog represent numbers than are necessary in the decimal system. The largest number that can be represented in n binary bits is ...
Get Digital Integrated Circuit Design Using Verilog and Systemverilog now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.