Consciousness results from comprehending the living creature from its existence in time and space. Thought and consciousness are distinguishing factors between humans and machines having artificial intelligence. No algorithm has been offered for artificial self-awareness based on Thinking. Previous studies have not studied the relationship between consciousness, thinking and time. In this study, the relationship between consciousness, thinking, memories and speech over time has been studied. A deep logical connection exists between consciousness, thinking, and time. An algorithm can be designed for artificial consciousness based on this research findings.