Detection and translation of logic gate images into Boolean functions
Muhammad Shidqii Taqiyyuddin, Muhammad Subali
Abstract
Artificial intelligence (AI) has become an essential tool in solving complex problems effectively and efficiently. In digital electronics, translating logic gate circuits into Boolean functions can be challenging, especially for more complex structures. This study presents the design of a detection and translation system for logic gate images into Boolean functions using the You Only Look Once (YOLOv5) object detection model. A dataset of 800 images was collected using a smartphone camera under varied lighting conditions and preprocessing to ensure robustness. The dataset was divided into 70% for training, 20% for validation, and 10% for testing. Training was conducted using YOLOv5s with batch size 32, 100 epochs, and pre-trained weights. The trained model achieved strong results with an overall mean average precision (mAP@0.5) of 0.922, precision of 0.98, and recall of 0.984. The confusion matrix confirmed accurate detection across all classes, with minimal misclassification. Furthermore, the translator system successfully converted recognized objects into correct Boolean expressions, with results validated in multiple test cases. This demonstrates that the proposed system can reliably automate circuit image-to-Boolean translation, bridging image recognition and symbolic computation.
Keywords
Artificial intelligence; Boolean function; Logic gate; Object detection; YOLOv5s
DOI:
https://doi.org/10.11591/csit.v7i3.p346-352
Refbacks
There are currently no refbacks.
Copyright (c) 2026 Muhammad Shidqii Taqiyyuddin, Muhammad Subali
Computer Science and Information Technologies p-ISSN: 2722-323X, e-ISSN: 2722-3221 This journal is published by the Institute of Advanced Engineering and Science (IAES) in collaboration with Universitas Ahmad Dahlan (UAD) .
<a title="Web Analytics" href="https://statcounter.com/" target="_blank"<img class="statcounter" src="https://c.statcounter.com/11992001/0/5fa2f457/0/" alt="Web Analytics"</div> <br> CSIT Visitor Stats
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License .