How does computer chip know what a 0 and a 1 is at base level?
It doesn't "know" anything, it just does what it does. An "on" transistor conducts, an "off" transistor doesn't. We build patterns out of the electrical components, in such a way that a certain pattern of high and low voltages here results in a different pattern of high and low voltages there a moment later. We call the low voltages 0 and the high voltages 1, but the components don't care what we call them.

We choose a representation of numbers as 0s and 1s, and then we build a circuit so that if we put the representation of a number A here and the representation of another number B here, then the representation of A+B comes out there, and we say that the component is doing addition, but all the electrons know is that they're following a potential gradient.

We hook things up so that when the user presses a button with the picture "7" on it, a collection of wires get high and low voltages forced on them in the pattern that we decided corresponds to the number 7. We hook other things up so that the voltages on another collection of wires light and extinguish small lamps in just the right pattern to make a picture of the number those wires represent. Now we've got ourselves... well, a calculator really, but we're on our way to a computer.