A fast and through memory-diagnostic test is described that checks for proper setting and clearing of individual bits in memory and also detects write operations that erroneously affect more than one memory location at a time. The test is quick enough so that it can be conveninetly run each time when the system is turned on. The test algorithm not only checks for proper setting and clearing of individual bits, but also detects faulty write operations that affect multiple memory locations. A flowchart for the complete test describes all parts and passes of the sliding-One and sliding-Zero tests.