Give me understanding
to separate mentally (or distinguish), i.e.(generally) understand
and I shall keep
to guard, in a good sense (to protect, maintain, obey, etc.) or a bad one (to conceal, etc.)
a precept or statute, especially the Decalogue or Pentateuch -- law.
yea I shall observe
to hedge about (as with thorns), i.e. guard; generally, to protect, attend to, etc.
it with my whole heart
the heart; also used (figuratively) very widely for the feelings, the will and even the intellect