Metadata-Version: 1.1
Name: bitwise
Version: 0.3
Summary: Bitwise is a library for utilizing Python as a hardware description language
Home-page: https://github.com/jamesjiang52/Bitwise
Author: James Jiang
Author-email: jamesjiang52@gmail.com
License: MIT
Description: *******
        Bitwise
        *******
        
        Bitwise is a Python library intended to make hardware design and simulation more accessible
        for software engineers. While it can never replace a true hardware description language,
        it aims to serve as a useful tool in the hardware design process, allowing a user to build and test
        their digital circuits in a high-level programming language (i.e. with simpler syntax and more
        flexible semantics) before implementing them using an HDL.
        
        Getting Started
        ===============
        
        Refer to the `documentation <https://bitwise.readthedocs.io/en/latest/>`_ for installation 
        instructions, usage examples, API reference, and more.
        
        Quick Example
        =============
        
        The following code creates a half-adder circuit::
        
            """
            Create a half-adder.
            """
            import bitwise as bw
            
            def main():
                # initialize inputs
                a = bw.wire.Wire()
                b = bw.wire.Wire()
        
                # initialize outputs
                sum_ = bw.wire.Wire()
                carry_out = bw.wire.Wire()
        
                # create circuit
                bw.gate.XORGate2(a, b, sum_)  # XORs a and b and puts the result into sum_
                bw.gate.ANDGate2(a, b, carry_out)  # ANDs a and b and puts the result into carry_out
                
            if __name__ == "__main__":
                main()
        
        Interacting with it in a Python session::
        
            >> a.value = 0
            >> b.value = 0
            >> sum_.value
            0
            >> carry_out.value
            0
            >> a.value = 1
            >> sum_.value
            1
            >> carry_out.value
            0
            >> b.value = 1
            >> sum_.value
            0
            >> carry_out.value
            1
        
Keywords: bitwise hardware design
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Software Development :: Libraries :: Python Modules
