From 11:00 PM CDT Friday, Nov 8 - 2:30 PM CDT Saturday, Nov 9, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From 11:00 PM CDT Friday, Nov 8 - 2:30 PM CDT Saturday, Nov 9, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
Introduction
Binary signals serve as the foundation for every digital system. Working with discrete binary signals, grouping related signals into buses, extracting signals from buses, and interpreting groups of bits as binary numbers are prerequisite skills for creating combinational and sequential logic circuits with LabVIEW FPGA. This tutorial reviews techniques for working with the LabVIEW “Boolean” data type, Boolean arrays, and integer data type, and presents two LabVIEW application VIs to illustrate these techniques.
Review of Binary Integer and Hexadecimal Representations
Digital systems represent information as groups of individual binary signals. A given pattern of binary signals (or bits) has no meaning without selecting a specific interpretation. The unsigned integer interpretation reviewed below is fundamental to the design of digital circuits and systems:
The closely-related signed integer interpretation forms the basis of integer-based mathematical calculations. The following video reviews concepts associated with signed integers:
Hexadecimal format represents binary integers in a compact format:
Boolean Data Type and Boolean Arrays
LabVIEW represents binary signals with the Boolean data type. Individual front-panel controls, indicators, and constants with this data type map onto individual wires on the FPGA target. LabVIEW represents a collection of related binary signals, or data bus, by a 1-D Boolean array. The "boolean_datatype_operations" VI linked at the end of this document illustrates techniques to work with discrete binary signals and buses. The next two videos demonstrate how to operate the VI and how the VI block diagram is constructed:
Integer Data Types
LabVIEW provides a mechanism to convert a Boolean array into an integer data type. Since an integer is a type of binary pattern, the integer data type may be considered a digital bus tagged with the integer interpretation. That is, an 8-element Boolean array and an 8-bit unsigned integer (called “U8” in LabVIEW) both map onto an 8-bit bus on the FPGA; the U8 data type merely indicates compatible connections to numerical-oriented nodes and subVIs.
The "numerical_interpretation_of_binary_pattern" VI linked at the end of this document illustrates conversion techniques between integer and Boolean data types. The next video demonstrates how to construct the VI:
Conclusion
LabVIEW Boolean and integer data types provide the foundation for representing and manipulating digital information on FPGA-based systems. LabVIEW provides a complete set of techniques to freely convert between discrete binary signals, buses, and integers.