<DOCUMENT>
<TYPE>EX-5
<SEQUENCE>4
<FILENAME>gpmcnsnt.txt
<DESCRIPTION>OPINION OF COUNSEL
<TEXT>
                                                                    EXHIBIT 5.1

           [LETTERHEAD OF GRAY, PLANT, MOOTY, MOOTY & BENNETT, P.A.]

October 1, 2003

NVE Corporation
11409 Valley View Road
Eden Prairie, Minnesota 55344
RE: Form S-3 Registration Statement

Gentlemen:

     This opinion is furnished in connection with the registration, pursuant to
the Securities Act of 1933, as amended, of 1,221,789 issued and outstanding
shares of common stock of NVE Corporation (the "Company") to be sold by John P.
Whaley (the "Shares").

     We have acted as counsel to the Company in connection with the preparation
of the Form S-3 Registration Statement (the "Registration Statement"). We have
examined the Amended and Restated Articles of Incorporation, the Bylaws of the
Company, as amended, such records of the proceedings of the Company as we
deemed material and such other certificates, records and documents as we
considered necessary for the purpose of this opinion.

     Based on the foregoing, we are of the opinion that the Shares are legally
issued, fully paid and non-assessable securities of the Company.  We understand
that this opinion is to be issued in connection with the Registration
Statement.  We consent to be named under the caption "Legal Matters" in the
Prospectus, which constitutes a part of the Registration Statement.  We further
consent to the filing of a copy of this opinion with the Registration
Statement.

                                  Very truly yours,

                                  GRAY, PLANT, MOOTY, MOOTY & BENNETT, P.A.

                                  /s/ Gray, Plant, Mooty, Mooty & Bennett, P.A.

</TEXT>
</DOCUMENT>
