Scientific studies of consciousness can be roughly categorized into two directions: (1) How/where does consciousness emerge? (the mechanism of consciousness) and (2) Why is there consciousness? (the function of consciousness). I will summarize my past research on the quest for consciousness in these two directions.