A Leading Zero Counter(LZC) is a digital circuit that determines the number of leading zeros in a binary number, and its design considerations include speed, area, and power consumption.The working of a 64-bit LZC is studied in this paper.The functionality of a 64-bit leading zero counter is investigated through a hierarchical design approach. Starting from a basic 2-bit configuration, the counter\'s underlying mechanics areanalysed and subsequently scaled up to accommodate 64-bit operations.In this paper basic gates such as AND gate, OR gate and inverter are used for implementing leading zero counter. Boolean equations are formed from previously proposedarchitectures and after simplifying that Boolean expression a new architecture for LZC unit is formed.Further calculation can be performed for a 128-bit leading zero counter. Performance and analysis of the 64-bit LZC can be conducted using this method, and the Xilinx Vivado design suite is utilized to simulate and synthesize the 64-bit leading zero counter.
Introduction
Overview
A Leading Zero Counter (LZC) is a digital circuit that determines the number of consecutive zeros at the beginning of a binary number. It is vital in high-performance computing for applications such as floating-point arithmetic, cryptography, and digital signal processing. This study presents the design and implementation of a 64-bit LZC, capable of efficiently counting leading zeros in large binary numbers, using hierarchical and hardware-efficient architecture.
Key Features of the 64-bit LZC
Accepts a 64-bit binary input and outputs a 7-bit result: a flag (V) for all-zero detection and a 6-bit count (Z) of leading zeros.
Built using a recursive, modular structure:
Combines two 32-bit LZCs
Each 32-bit LZC is composed of two 16-bit LZCs, and so on down to 2-bit modules
Supports parallel processing and low-latency operation.
Offers high scalability and compatibility with modern 64-bit computing systems.
Literature Survey Insights
Multiple prior works have developed LZCs for 8-bit to 64-bit operations, primarily on FPGAs.
Design approaches vary from ASIC-based logic to probabilistic and approximate techniques for better energy efficiency.
Some methods use direct logic, while others rely on hierarchical composition.
Optimization efforts focus on reducing LUTs (Look-Up Tables), slices, power consumption, and delay, making them suitable for low-power and real-time systems like IoT and edge AI.
Proposed Design Methodology
Stepwise modular construction:
Start with a 2-bit LZC (2 inputs, 2 outputs: V and Z)
Extend to 4-bit, 8-bit, 16-bit, 32-bit, and finally 64-bit by combining lower-bit modules
Logic gates and equations are used to compute the overflow flag (V) and zero count (Z).
RTL (Register Transfer Level) design and waveform simulations confirm functionality at each level.
Results and Performance
RTL schematics and waveform outputs for each version (2-bit to 64-bit) confirm the design’s correctness.
Comparative analysis table shows that the proposed design:
Consumes the least power across all bit-widths
Uses fewer LUTs and slices
Has competitive delay
Achieves lowest Power-Delay Area Product (PDAP) in most cases, especially at 64-bit
Bit Width
LUTs
Slices
Power (mW)
Delay (ns)
PDAP
64-bit (Proposed)
47
18
5.29
3.72
1967.88
Compared References
Vary
Vary
Up to 8.84
Up to 3.83
Up to 2333.76
Conclusion
In this paper, a 64-bit Leading Zero Counter (LZC) was designed using a hierarchical approach, starting from a 2-bit configuration and expanding to handle 64-bit numbers. Basic gates such as AND, OR, and inverters were used to form and simplify Boolean expressions, leading to an optimized LZC architecture. The design was synthesized and analyzed using Xilinx Vivado, where reports on area, power, and timing were obtained, highlighting the trade-offs in resource utilization and performance.
This design serves as a foundation for extending to larger bit-width counters, like 128-bit LZC, and can be applied in fields such as digital signal processing, high-performance computing, and cryptography, where efficient leading zero detection is essential. Future work could focus on further power optimization and integration into larger systems for more complex applications.
References
[1] J. Miao and S. Li, “A design for high speed leading-zero counter,” inProc. ISCE, Kuala Lumpur, Malaysia, 2017, pp. 22–23.
[2] A. Zahir, A. Ullah, P. Reviriego, and S. R. U. Hassnain, “Efficient leading zero count (LZC) implementations for Xilinx FPGAs,” IEEEEmbedded Syst. Lett., vol. 14, no. 1, pp. 35–38, Mar. 2022.
[3] G. Dimitrakopoulos, K. Galanopoulos, C. Mavrokefalidis, andD. Nikolos, “Low-power leading-zero counting and anticipation logicfor high-speed floatingpoint units,” IEEE Trans. Very Large Scale Integrate.(VLSI) Syst., vol. 16, no. 7, pp. 837–850, Jul. 2008.
[4] S. Liu, P. Reviriego, P. Junsangsri, and F. Lombardi, “Probabilisticapproximate computing at nanoscales,” IEEE Nanotech. Mag., vol. 16,no. 1, pp. 16–24, Feb. 2022.
[5] F. G. Zacchigna, “Methodology for CNN implementation in FPGAbased embedded systems,” IEEE Embedded Syst. Lett., early access,Jun. 29, 2022, doi: 10.1109/LES.2022.3187382.
[6] H. F. Langorudi, V. Karia, T. Pandit, and D. Kudithipudi, “TENT:Efficient quantization of neural networks on the tiny edge with taperedfixed PoiNT,” 2021, arXiv:2104.02233.
[7] S. Ullah, T. D. A. Nguyen, and A. Kumar, “Energy-efficient lowlatency signed multiplier for FPGA-based hardware accelerators,” IEEEEmbedded Syst. Lett., vol. 13, no. 2, pp. 41–44, Jun. 2021.
[8] H. Zhang, H. J. Lee, and S.-B. Ko, “Efficient fixed/floating-point mergedmixed-precision multiply-accumulate unit for deep learning processors,”in Proc. ISCAS, Florence, Italy, 2018, pp. 1–5.
[9] S. Perri, F. Frustaci, F. Spagnolo, and P. Corsonello, “Efficient approximate adders for FPGA-based data-paths,” Electronics, vol. 9, no. 9,pp. 1–19, Sep. 2020.
[10] S. Perri, F. Frustaci, F. Spagnolo, and P. Corsonello, “Design of realtime FPGA-based embedded system for stereo vision,” in Proc. ISCAS,Florence, Italy, 2018, pp. 1–5.
[11] N.Z. Milenkovic, V. V. Stankovi ´ c, M.L. Mili ´ c. ”Modular Design Of Fast Leading Zeros Counting Circuit” in Journal of Electrical Engineering, 2015 Nov 1,66(6):329-33.
[12] Xilinx, “Vivado Design Suite User Guide: High Level Synthesis”, UG902 (v2017.4) February 2, 2018.