Huehive Logo

HueHive

#f9f Pinkalicious
#333 Carbon

How does a computer execute a program?

Palette Description

mermaid
stateDiagram
    classDef fetching fill:#f9f,stroke:#333,stroke-width:2px
    classDef decoding fill:#f9f,stroke:#333,stroke-width:2px
    classDef executing fill:#f9f,stroke:#333,stroke-width:2px
    classDef storing fill:#f9f,stroke:#333,stroke-width:2px

    [*] --> Fetch: Fetch Instruction
    Fetch --> Decode: Decode Instruction
    Decode --> Execute: Execute Instruction
    Execute --> Store: Store Result
    Store --> Fetch
    Fetch --> [*]

    class Fetch fetching
    class Decode decoding
    class Execute executing
    class Store storing