
<PAGE>   1
                                                                       Exhibit 5

                        [CUMMINGS & LOCKWOOD LETTERHEAD]
                                                                                



                                 June 5, 1996

Analysis & Technology, Inc.
Technology Park, Route 2
P.O. Box 220
North Stonington, CT  06359

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

Dear Sirs:

                    We have acted as 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") and relating to 50,000 shares (the "Shares") of common stock, no par
value (the "Common Stock"), of the Corporation which may be acquired by the
Analysis & Technology, Inc. Deferred Compensation Plan (the "Plan") and which
may be distributed to participants therein.

                    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) resolutions of the Board of
Directors 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-                         June 5, 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 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

  

