When the liver fails, toxins - such as ammonia - that should be filtered from the blood build up and reach the brain.