This is a project written in ARM7 code with the aim of simulating how a Deterministic Finite Automata functions.
- I wanted to build something in ARM machine code to test my understanding of the instruction set provided, and also see whether I can make a working code myself in ARM.
- I was also studying Theory of Computation and was fascinated how machines work. I wanted to implement a simple single threaded DFA myself.
- The main ARM code is in one single file :
logic.s
- To run the project locally
- Download Keil UVision4.
- Clone the repository and open it within Keil UVision4.
- Place your String to be tested in REG r1
- Enter the size of your string in REG r0
- Run
logic.s
Accepted Strings in this automata: (i times 0 then j times 1) such that i, j >= 0 and i+j is even.
Examples : 01, 0011, 0001, 11 are accepted
10, 011, 0110 are rejected.
Current State | On input "0" | On input "1" |
---|---|---|
->*0 | 1 | 2 |
1 | 0 | 3 |
2 | 4 | 3 |
*3 | 4 | 2 |
4 | 4 | 4 |