> For the complete documentation index, see [llms.txt](https://gittest2121.gitbook.io/nand2tetris/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gittest2121.gitbook.io/nand2tetris/misc/int2bool.md).

# Int2Bool

Misc is a package in Java™ Implementation of nand2tetris. It contains basic utilites and reusable codes for creation and modification of chips and its outputs.

### Int2Bool Method in class Convert

**Input:** Integer

**Output:** Boolean&#x20;

```java
    public static boolean Int2Bool(int value) {
        boolean bool;
        if (value == 1) {
            bool = true;
        } else {
            bool = false;
        }
        return bool;
    }
```

Unlike most programming languages, Java treats boolean and integer data types unusually. However, some of the implemented gates takes values in the form of binary integral values (0 or 1). Therefore, a method Int2Bool is created to convert binary integrall values (0 and 1) to boolean (true and false) for faster comparisons.
