
<PAGE>   1
                                                                       Exhibit 5
                        [Cummings & Lockwood Letterhead]


                                  May 20, 1996

Analysis & Technology, Inc.
Route 2
PO Box 220
North Stonington, CT   06359

                  Re:    Analysis & Technology, Inc.
                         Registration Statement on Form S-8
  
Dear Sirs:

                  We have acted as special counsel for Analysis & Technology,
Inc., a Connecticut corporation (the "Corporation"), in connection with its
registration statement on Form S-8 being filed on the date hereof (the
"Registration Statement") relating to 110,000 shares (the "Shares") of common
stock, no par value (the "Common Stock"), of the Corporation which may be issued
upon the exercise of options pursuant to the Corporation's 1995 Stock Option
Plan (the "Plan").

                  In that connection, we have examined originals, or copies
certified or otherwise identified to our satisfaction, of such documents,
corporate records, and other instruments as we have deemed necessary or
appropriate for the purpose of rendering this opinion, including: (a) the
Certificate of Incorporation of the Corporation; (b) the By-Laws of the
Corporation; (c) the Registration Statement; (d) the minutes of the meetings of
the Board of Directors and shareholders of the Corporation relating to the
approval of the Plan; and (e) the Plan.

                  Based upon the foregoing, we are of the opinion that the
Shares will, upon issuance in accordance with the provisions of the Plan, be
validly issued, fully paid, and nonassessable.
<PAGE>   2
Analysis & Technology, Inc.           -2-                           May 20, 1996




                  The opinion contained herein is qualified as follows. While it
is our understanding that the Corporation does not now have any issued but not
outstanding shares, the Corporation may use currently issued shares of its
Common Stock which it may hereafter acquire to satisfy its obligation to deliver
shares under the Plan in lieu of issuing new shares. As an opinion with respect
to any such treasury shares which might be delivered to satisfy obligations
under the Plan would require a review of all issuances of stock by the
Corporation from the date of its incorporation, the opinion contained herein is
intentionally and specifically limited to those shares which may hereafter be
issued by the Corporation for delivery pursuant to the Plan.

                  We hereby consent to the filing of this opinion as Exhibit 5
to the Registration Statement.


                                                 Very truly yours,




                                                 /s/  Cummings & Lockwood



