<DOCUMENT>
<TYPE>EX-7.1
<SEQUENCE>3
<FILENAME>dex71.txt
<DESCRIPTION>STOCK PURCHASE AGREEMENT
<TEXT>
<PAGE>

                                                                     EXHIBIT 7.1
                                                                     -----------

                            STOCK PURCHASE AGREEMENT
                            ------------------------

         THIS STOCK PURCHASE AGREEMENT (the "Agreement") is made as of the 10th
day of July, 2003, by and between NORWEST EQUITY PARTNERS IV, L.P. ("NEP IV")
(the "Seller") and JOHN P. WHALEY (the "Purchaser").

                                    RECITALS
                                    --------

         WHEREAS, the Seller desires to sell, and Purchaser desires to acquire
from Seller a total of one million two hundred twenty one thousand four hundred
eighty seven (1,221,487) shares of the common stock of NVE Corporation (the
"Shares") with offices at 11409 Valley View Road, Eden Prairie, MN 55344, on the
terms and conditions hereinafter set forth.

                                   WITNESSETH:
                                   -----------

         NOW, THEREFORE, in consideration of the covenants and agreements herein
set forth and in reliance on the representation contained herein, the parties
hereby agree as follows:

         Section 1. Purchase and Sale of Stock.

         1.1      Method of Transfer. Seller hereby agrees to sell, transfer,
                  assign and deliver to the Purchaser and Purchaser agrees to
                  acquire 1,221,487 Shares, free and clear of all liens, charges
                  and encumbrances.

         1.2      Purchase Price & Method of Payment. The Purchase Price for the
                  Shares shall be $20.50 per share (the "Per Share Price"), for
                  an aggregate purchase price to be paid to NEP IV of
                  $25,040,483 (the "Purchase Price"), plus appropriate
                  adjustment pursuant to 1.3 of this section, where such
                  Purchase Price is payable with a Non Recourse Promissory Note
                  to the Seller in the form attached as Exhibit A hereto (the
                  "Note").

         1.3      Purchase Price Adjustment. On each date that Purchaser makes a
                  sale of any of the Shares, the Purchase Price shall be
                  adjusted as follows:

                  (a)      If the sale price of the shares is greater than Per
                           Share Price, then the Purchase Price shall be
                           adjusted upward by an amount equal to the number of
                           shares sold multiplied by the difference between the
                           price at which they were sold and the Per Share
                           Price; or

                  (b)      If the sale price of the shares is lower than Per
                           Share Price, than the Purchase Price shall be
                           adjusted downward by an amount equal to the number of
                           shares sold multiplied by the difference between the
                           price at which they were sold and the Per Share
                           Price.

                                       1.

<PAGE>

                  (c)      Upon any adjustment to the Purchase Price, the
                           principal amount of the note will be appropriately
                           adjusted.

         1.4      Settlement & Closing: The closing hereunder, including payment
                  for and delivery of the Shares shall occur at the office of
                  the Seller, or at such other time and place as the parties may
                  mutually agree. At closing, Seller shall deliver or cause to
                  be delivered to Purchaser stock certificates endorsed in blank
                  or accompanied by duly endorsed stock powers, the aggregate of
                  such certificates representing the stock of the company and
                  all other instruments.

         Section 2. Representations.

                  (a) In connection with the purchase of the Shares, Purchaser
         agrees (i) to assume and be bound by any and all restrictions and
         obligations with respect to the Shares, whatever those may be and (ii)
         that at any time and from time to time Purchaser will promptly execute
         and deliver such further instruments and documents and take such
         further action as may be reasonably required in order to carry out the
         full intent and purpose of this Agreement

                  (b) In connection with the sale of the Shares, Seller
         represents to the Purchaser that it has full power and authority to
         sell, assign and transfer the Shares to the Purchaser, free and clear
         of all liens, claims, and encumbrances and that the Shares are not
         subject to any adverse claim.

         Section 3. Miscellaneous.

                  (a) Notices. All notices required or permitted hereunder shall
         be in writing and shall be deemed effectively given: (a) upon personal
         delivery to the party to be notified, (b) when sent by confirmed telex
         or facsimile if sent during normal business hours of the recipient, and
         if not during normal business hours of the recipient, then on the next
         business day, (c) five (5) calendar days after having been sent by
         registered or certified mail, return receipt requested, postage
         prepaid, or (d) one (1) business day after deposit with a nationally
         recognized overnight courier, specifying next day delivery, with
         written verification of receipt. All communications shall be sent to
         the other party hereto at such party's address hereinafter set forth on
         the signature page hereof, or at such other address as such party may
         designate by ten (10) days advance written notice to the other party
         hereto.

                  (b) Governing Law; Venue. This Agreement shall be governed by
         and construed in accordance with the laws of the State of Minnesota.
         The parties agree that any action brought by either party to interpret
         or enforce any provision of this Agreement shall be brought in, and
         each party agrees to, and does hereby, submit to the jurisdiction and
         venue of, the appropriate state or federal court for the district
         encompassing the Sellers' principal place of business.

                  (c) Entire Agreement; Amendment. This Agreement constitutes
         the entire agreement between the parties with respect to the subject
         matter hereof and supersedes and merges all prior agreements or
         understandings, whether written or oral. This Agreement may not be
         amended, modified or revoked, in whole or in part, except by an
         agreement in writing signed by each of the parties hereto.

                  (d) Severability. If one or more provisions of this Agreement
         are held to be unenforceable under applicable law, the parties agree to
         renegotiate such provision in good faith. In the event that the parties
         cannot reach a mutually agreeable and enforceable replacement for such
         provision, then (i) such provision shall be excluded from this
         Agreement, (ii) the balance of the Agreement shall be

                                       2.

<PAGE>

         interpreted as if such provision were so excluded and (iii) the balance
         of the Agreement shall be enforceable in accordance with its terms.

                  (e) Counterparts. This Agreement may be executed in two or
         more counterparts, each of which shall be deemed an original and all of
         which together shall constitute one instrument.

         IN WITNESS WHEREOF, the parties hereto have executed this Agreement as
of the day and year first above written.


                                  NORWEST EQUITY PARTNERS IV, L.P.
                                  BY:  ITASCA PARTNERS, LLP

                                  By:
                                     -------------------------------------------
                                          John E. Lindahl

                                  Title:  Managing Partner
                                          --------------------------------------

                                  Address:  3600 IDS Center, 80 South 8th Street
                                          --------------------------------------
                                             Minneapolis, MN  55402

                                  PURCHASER:


                                  ----------------------------------------------
                                  JOHN P. WHALEY

                                  Address:  1978 Summit Avenue
                                           -------------------------------------
                                            St. Paul, MN 55105

                                       3.

<PAGE>

                                    EXHIBIT A


                             FORM OF PROMISSORY NOTE




                                       4.

</TEXT>
</DOCUMENT>
