Skip to content

contactsunny/LogicGatesJava

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Logic Gates implementation in Java

Input Arrays

a[]: [1, 0, 1, 0, 1]
b[]: [0, 1, 1, 0, 0]

Output

AND Gate:
  -  -   -  
| a  b | c |
| -  - | - |
| 1  0 | 0 |
| 0  1 | 0 |
| 1  1 | 1 |
| 0  0 | 0 |
| 1  0 | 0 |
  -  -   -  
OR Gate:
  -  -   -  
| a  b | c |
| -  - | - |
| 1  0 | 1 |
| 0  1 | 1 |
| 1  1 | 1 |
| 0  0 | 0 |
| 1  0 | 1 |
  -  -   -  
NAND Gate:
  -  -   -  
| a  b | c |
| -  - | - |
| 1  0 | 1 |
| 0  1 | 1 |
| 1  1 | 0 |
| 0  0 | 1 |
| 1  0 | 1 |
  -  -   -  
NOR Gate:
  -  -   -  
| a  b | c |
| -  - | - |
| 1  0 | 0 |
| 0  1 | 0 |
| 1  1 | 0 |
| 0  0 | 1 |
| 1  0 | 0 |
  -  -   -  
NOT Gate for a[]:
  -  -   -  
| a  b | c |
| -  - | - |
| 1  0 | 0 |
| 0  1 | 1 |
| 1  1 | 0 |
| 0  0 | 1 |
| 1  0 | 0 |
  -  -   -  
XOR Gate:
  -  -   -  
| a  b | c |
| -  - | - |
| 1  0 | 1 |
| 0  1 | 1 |
| 1  1 | 0 |
| 0  0 | 0 |
| 1  0 | 1 |
  -  -   -  
XNOR Gate:
  -  -   -  
| a  b | c |
| -  - | - |
| 1  0 | 0 |
| 0  1 | 0 |
| 1  1 | 1 |
| 0  0 | 1 |
| 1  0 | 0 |
  -  -   -  

About

A Java application to implement logic gates

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages