I'd draw the boundary this way - hardware talks about how physical components will affect behavior of voltage levels, software talks about how one voltage levels will affect behavior of other voltage levels.
There's a think called a J-K flip flop that is worth having a look at - it's the simplest memory element conceptually and it takes a number of transistors to actually implement (6 I think from memory in TTL - I may be wrong - it was a long time ago).
In a real cpu D-Ram stores the bits (1's and 0's) and it works by storing a charge http://en.wikipedia.org/wiki/Dynamic_random-access_memory
The software / hardware boundary you speak of is a matter of definition and different people would define it differently. For a hardware developer, they would probably regard microcode as software, but an application developer would regard it as part of the hardware.
hth