<PAGE>


                                                                     Exhibit 4.1


                         REGISTRATION RIGHTS AGREEMENT

                                     AMONG

                              THE STOCKHOLDERS OF
                               TROY SYSTEMS, INC.

                                      AND

                              PEC SOLUTIONS, INC.






                               November 20, 2001



<PAGE>


                          REGISTRATION RIGHTS AGREEMENT

         THIS REGISTRATION RIGHTS AGREEMENT (this "AGREEMENT") dated as of
November 20, 2001, by and among PEC Solutions, Inc., a Delaware corporation (the
"COMPANY"), and the holders whose names, addresses and number of Company Shares
(as defined below) are listed on SCHEDULE A attached hereto (the "HOLDERS").

        WHEREAS, pursuant to a Stock Purchase Agreement dated as of November 20,
2001 by and among the Company, TROY Systems, Inc., and the Holders (the "STOCK
PURCHASE AGREEMENT"), the Holders shall be issued an aggregate of 103,065 shares
of the Company's unregistered Common Stock (as defined below) (the "COMPANY
SHARES");

        WHEREAS, the execution and delivery of this Agreement is a condition to
the closing of the Stock Purchase Agreement; and

        WHEREAS, the Holders desire the Company Shares to entitle the Holders to
the rights described herein.

        NOW, THEREFORE, in consideration of the mutual covenants and promises
set forth herein, the parties hereto, intending to be legally bound, agree as
follows:

         1.       DEFINITIONS.  Capitalized  terms used herein and not otherwise
defined shall have the meanings set forth in the Stock Purchase Agreement.
Unless the context otherwise requires, the following terms shall have the
following meanings for purposes of this Agreement:

                  (a) "COMMISSION" shall mean the Securities and Exchange
Commission or any other federal agency at the time administering the Securities
Act.

                  (b) "COMMON STOCK" shall mean the common stock of the Company,
par value $0.01 per share.

                  (c) "PARTICIPATING HOLDER" shall mean any Holder participating
in a registration pursuant to Section 2.

                  (d) "PERSON" shall include an individual, corporation,
partnership, limited liability company, joint venture, association, trust, or
any other entity or organization.

                  (e) The terms "REGISTER," "REGISTERED" and "REGISTRATION"
refer to a registration effected by preparing and filing a registration
statement in compliance with the Securities Act and the declaration or ordering
of effectiveness of such registration statement by the Commission.

                  (f) "REGISTRABLE SECURITIES" shall mean the Company Shares,
including Company Shares issued upon the exercise of outstanding options and
warrants, as well as any securities issued as a dividend or other distribution
with respect to (because of stock splits, stock


<PAGE>


dividends, reclassifications, recapitalizations, or similar events), or in
exchange or in replacement of, the securities referred to above.

                  (g) "SECURITIES ACT" shall mean the Securities Act of 1933, as
amended, or any similar federal statute enacted hereafter, and the rules and
regulations promulgated thereunder, all as the same shall be in effect from time
to time.

                  (h) "TRANSFER" as to any shares of Company Shares, shall mean
to sell, or in any other way directly or indirectly, to transfer, assign,
distribute, encumber, pledge, hypothecate or otherwise dispose of, either
voluntarily or involuntarily (or a sale, or any other direct or indirect
transfer, assignment, distribution, encumbrance or other voluntary or
involuntary disposition) (as the case may be).

                  (i) "1934 ACT" shall mean the Securities Exchange Act of 1934,
as amended, or any similar federal statute enacted hereafter, and the rules and
regulations of the Commission thereunder, all as the same shall be in effect
from time to time.

         2.       REGISTRATION RIGHTS.

                  (a) REGISTRATION ON FORM S-3. Following the expiration of the
Lock Up Period (as defined in Section 2(k)) and subject to Section 2(c) of this
Agreement, at any time after the Company becomes eligible to file a registration
statement on Form S-3 (or any successor form relating to secondary offerings), a
Holder or Holders of the Registrable Securities may request, in writing, that
the Company effect the registration on Form S-3 (or such successor form), of
Registrable Securities having an aggregate value of at least $1,000,000 (based
on the then current public market price). The Company shall keep the
registration statement effective until the earlier of: (i) one year after its
effective date; (ii) all Registrable Securities have been sold thereunder; or
(iii) the time the Registrable Securities may be sold without registration and
without restriction under the Securities Act.

                  (b) PIGGYBACK REGISTRATION. Following the expiration of the
Lock Up Period (as defined in Section 2(k)), the Company agrees that, if at any
time the Company proposes to register any of its securities under the Securities
Act for its own account or for the account of others in connection with the
public offering of such securities solely for cash, on a registration form that
would also permit the registration of Registrable Securities and other than:
(i) a registration pursuant to Section 2(a); (ii) a registration relating solely
to employee benefit plans; (iii) a registration relating solely to a Commission
Rule 145 transaction; (iv) a registration statement on Form S-3 or S-4 (or
successor form) for the issuance of shares by the Company solely in connection
with an acquisition, whether by merger, consolidation, sale of assets, sale or
exchange of stock or otherwise (a "SUBSEQUENT ACQUISITION"); or (v) a
registration on any registration form which does not permit secondary sales; the
Company shall, each such time, promptly give each Holder written notice of such
proposal. Upon the written request of each Holder given within thirty (30) days
after mailing of any such notice by the Company, the Company shall cause to be
included in such registration under the Securities Act all Registrable
Securities that each Holder has requested be registered, provided that the
Company shall have


                                      -2-
<PAGE>


the right to postpone or withdraw any proposed registration of its securities
without obligation to any Holder. The Company, upon written notice to such
Holders, shall have the right to limit such Registrable Securities to be
registered, if any, to the largest number which would not, (i) in the opinion of
the Company's investment banker or managing underwriter engaged by the Company
in connection with such offering or (ii) based on the good faith judgment of the
Board of Directors of the Company, result in such interference or detriment or,
if any number would result in such interference or detriment, to exclude from
such registration all such Registrable Securities. No Registrable Securities
excluded from the registration by reason of the immediately prior sentence shall
be included in such registration. Such limitation shall be applied to each such
Holder PRO RATA in respect of the number of shares subject to such request or
proposed for registration, as the case may be. The obligations of the Company
pursuant to this Section 2(b) shall terminate upon the second anniversary of the
Closing under the Stock Purchase Agreement.

                  (c) LIMITATIONS ON REGISTRATION RIGHTS.  The Company shall not
be required to effect:

                      (i)    any registration during the period starting with
the date of filing of, and the ending on the date 180 days following the
effective date of, any registration statement of the Company; provided that the
Company uses its reasonable best efforts to cause such registration statement to
become effective;

                      (ii)   any registration statement on Form S-3 (or any
successor form related to secondary offerings) if the Company has, within the
six (6) month period preceding the date of such request, already effected one
(1) registration on Form S-3 for the Holders pursuant to Section 2(a); or

                      (iii)  any registration, if the Company shall furnish to
the Participating Holders, a certificate signed by the Chairman of the Board
stating that in the good faith judgment of the Board of Directors of the Company
it would be seriously detrimental to the Company and its stockholders for such
registration statement to be effected at such time, in which event the Company
shall have the right to defer such filing for a period of not more than ninety
(90) days after the receipt of the request of the Holder who initiated the
request for registration; provided that such right to delay a request shall be
exercised by the Company not more than twice in any twelve (12) month period.

                  (d) OBLIGATION OF THE COMPANY.  Whenever required under this
Agreement to effect the registration of any Registrable Securities, the Company
shall, as expeditiously as reasonably possible:

                      (i)    Prepare and file with the Commission a registration
statement covering such Registrable Securities and use its best efforts to cause
such registration statement to be declared effective by the Commission and to
keep such registration effective until the earlier of (1) the date when all
Registrable Securities covered by the registration statement have been sold or
(2) in the case of a registration pursuant to Section 2(a) hereof, the period
set forth in such section. The Company will furnish to each Participating Holder
and the underwriters, if


                                      -3-
<PAGE>


any, copies of all such documents, proposed to be filed (excluding exhibits,
unless any such person shall specifically request exhibits), which documents
will be subject to the review of each Participating Holder and underwriters, and
the Company will not file such registration statement or any amendment thereto
or any prospectus or any supplement thereto (including any documents
incorporated by reference therein) with the Commission if (1) any Participating
Holder or the underwriters, if any, shall reasonably object to such filing or
(2) information in such registration statement or prospectus concerning any
Participating Holder has changed and any Participating Holder or the
underwriters, if any, shall reasonably object. The Company shall take all
reasonable steps necessary to ensure that such registration statement as of its
effective date, or any final prospectus (as from time to time amended or
supplemented by the Company), does not contain an untrue statement of a material
fact or omit to state a material fact required to be stated therein or necessary
to make the statements therein not misleading (provided that the Company shall
not be responsible for the accuracy and completeness of information furnished by
the Holders in writing expressly for inclusion in such registration statement).

                      (ii)   Prepare and file with the Commission such
amendments and post-effective amendments to such registration statement as may
be necessary to keep such registration statement effective during the period
referred to in Section 2(d)(i) hereof and to comply with the provisions of the
Securities Act with respect to the disposition of all securities covered by such
registration statement, and cause the prospectus to be supplemented by any
required prospectus supplement, and as so supplemented to be filed with the
Commission pursuant to Rule 424 under the Securities Act.

                      (iii)  Furnish to each Participating Holder such numbers
of copies of such registration statement, each amendment thereto, the prospectus
included in such registration statement (including each preliminary prospectus),
each supplement thereto and such other documents as the Participating Holder may
reasonably request in order to facilitate the disposition of Registrable
Securities owned by it.

                      (iv)   Use its best efforts to register and qualify the
Registrable Securities under such other securities laws of such jurisdictions as
shall be reasonably requested by each Participating Holder and do any and all
other acts and things which may be reasonably necessary or advisable to enable
each Participating Holder to consummate the disposition of the Registrable
Securities in such jurisdictions; provided that the Company shall not be
required in connection therewith or as a condition thereto to qualify generally
to transact business in any such states or jurisdictions.

                      (v)    Promptly notify each Participating Holder at any
time when a prospectus relating to Registrable Securities is required to be
delivered under the Securities Act of the happening of any event as a result of
which the prospectus included in such registration statement contains an untrue
statement of a material fact or omits to state any fact necessary to make the
statements therein not misleading and, at the request of any Participating
Holder, the Company will, as promptly as possible, but in any event within 10
business days; PROVIDED, HOWEVER, if the disclosure required would have a
material adverse effect upon the Company or materially impair the activities of
the Company, then the Company shall have an additional 10


                                      -4-
<PAGE>


business days, to prepare a supplement or amendment to such prospectus so that,
as thereafter delivered to the purchasers of such Registrable Securities, such
prospectus will not contain an untrue statement of a material fact or omit to
state any fact necessary to make the statements therein not misleading.

                      (vi)   Make available for inspection by each Participating
Holder, any underwriter participating in any disposition pursuant to such
registration statement and any attorney, accountant or other agent retained by
any Participating Holder or underwriter, all financial and other records,
pertinent corporate documents and properties of the Company, and cause the
officers, directors, employees and independent accountants of the Company to
supply all information reasonably requested by any such seller, underwriter,
attorney, accountant or agent in connection with such registration statement,
which information shall be subject to reasonable restrictions concerning
confidentiality and non-disclosure.

                      (vii)  Notify each Participating Holder and the
underwriters, if any, of the following events and (if requested by any such
person) confirm such notification in writing: (1) the filing of the prospectus
or any prospectus supplement and the registration statement and any amendment or
post-effective amendment thereto and, with respect to the registration statement
and any amendment or post-effective amendment thereto and, with respect to the
registration statement or any post-effective amendment thereto, the declaration
of the effectiveness of such documents; (2) any requests by the Commission for
amendments or supplements to the registration statement or the prospectus or for
additional information; (3) the issuance or threat of issuance by the Commission
of any stop order suspending the effectiveness of the registration statement or
the initiation of any proceedings for that purpose; and (4) the receipt by the
Company of any notification with respect to the suspension of the qualification
of the Registrable Securities for sale in any jurisdiction or the initiation or
threat of initiation of any proceeding for such purpose.

                      (viii) Make every reasonable effort to (1) prevent the
entry of any order suspending the effectiveness of the registration statement
and (2) obtain the withdrawal of any such order, if entered.

                      (ix)   If reasonably requested by any underwriter or any
Participating Holder in connection with any underwritten offering, incorporate
in a prospectus supplement or post-effective amendment such information as the
underwriters and the Participating Holders agree should be included therein
relating to the sale of the Registrable Securities, including, without
limitation, information with respect to the number of Registrable Securities
being sold to such underwriters, the purchase price being paid therefor by such
underwriters and any other terms of the underwritten (or best efforts
underwritten) offering of the Registrable Securities to be sold in such
offering, and make all required filings of such prospectus supplement or
post-effective amendment after being notified of the matters to be incorporated
in such prospectus supplement or post-effective amendment.

                      (x)    Cooperate with the Participating Holders and the
underwriters, if any, to facilitate the timely preparation and delivery of
certificates representing Registrable


                                      -5-
<PAGE>


Securities to be sold and not bearing any restrictive legends, and enable such
Registrable Securities to be in such lots and registered in such names as the
underwriters may request at least two (2) business days prior to any delivery of
Registrable Securities to the underwriters.

                      (xi)   Provide a CUSIP number for all Registrable
Securities not later than the effective date of the registration statement.

                      (xii)  Prior to the effectiveness of the registration
statement and any post-effective amendment thereto and at each closing of an
underwritten offering: (1) make such representations and warranties to each
Participating Holder and the underwriters, if any, with respect to the
Registrable Securities and the underwriters, if any, with respect to the
Registrable Securities and the registration statement as are customarily made by
issuers to underwriters in primary underwritten offerings; (2) obtain opinions
of counsel to the Company and updates thereof (which opinions shall be
reasonably satisfactory to the underwriters, if any, and to the Participating
Holders) addressed to each Participating Holder and the underwriters, if any,
covering the matters customarily covered in opinions requested in underwritten
offerings and such other matters as may be reasonably requested by the
Participating Holders and underwriters or their counsel; (3) obtain "cold
comfort" letters and updates thereof from the Company's independent certified
public accountants addressed to each Participating Holder and the underwriters,
if any, such letters to be in customary form and covering matters of the type
customarily covered in "cold comfort" letters by underwriters in connection with
primary underwritten offerings; and (4) deliver such documents and certificates
as may be reasonably requested by the Participating Holders and by the
underwriters, if any, to evidence compliance with clause (1) above and with any
customary conditions contained in the underwriting agreement or other agreement
entered into by the Company.

                      (xiii) Otherwise use its best efforts to comply with all
applicable rules and regulations of the Commission.

                  (e) FURNISH INFORMATION. It shall be a condition precedent to
the obligations of the Company to take any action pursuant to this Section 2
that each Participating Holder shall furnish to the Company such information
regarding it, the Registrable Securities held by it, and the intended method of
disposition of such Registrable Securities as the Company shall reasonably
request in writing and as shall be required in connection with the action to be
taken by the Company.

                  (f) SUSPENSION OF DISPOSITION OF REGISTRABLE SECURITIES. Each
Participating Holder agrees that, upon receipt of any notice from the Company of
the happening of any event of the kind described in Section 2(d)(v) hereof (a
"SUSPENSION NOTICE"), such Holder will forthwith discontinue disposition of
Registrable Securities until such Holder's receipt of copies of a supplemented
or amended prospectus contemplated by Section 2(d)(v) hereof, or until it is
advised in writing (the "ADVICE") by the Company that the use of the prospectus
may be resumed, and has received copies of any additional or supplemental
filings which are incorporated by reference in the prospectus, and, if so
directed by the Company, each Participating Holder will deliver to the Company
(at the expense of the Company) all copies,


                                      -6-
<PAGE>


other than permanent file copies then in each Participating Holder's possession,
of the prospectus covering such Registrable Securities current at the time of
receipt of such Suspension Notice. In the event the Company shall give any such
Suspension Notice, the time periods mentioned in Section 2(d)(i) hereof shall be
extended by the number of days during the period from and including the date of
the giving of such notice pursuant to Section 2(d)(v) hereof to and including
the date when each Participating Holder shall have received the copy of the
supplemented or amended prospectus contemplated by Section 2(d)(v) hereof or the
Advice. The Company shall not deliver more than three Suspension Notices in any
twelve-month period.

                  (g) EXPENSES OF REGISTRATION. All expenses incurred in
connection with a registration pursuant to Section 2(a) and Section 2(b) hereof
(excluding underwriters' discounts and commissions), including, without
limitation all registration and qualification fees, fees and disbursements of
counsel for the Company shall be borne by the Company.

                  (h) UNDERWRITING REQUIREMENTS; PRIORITIES.

                      (i)    The Company will have the right to select the
investment banker(s) and manager(s) to administer any offering to which
Section 2(b) hereof is applicable.

                      (ii)   No Person may participate in any underwritten
registration hereunder unless such Person (1) agrees to sell such Person's
securities on the basis provided in any underwriting arrangements approved by
the Persons entitled hereunder to approve such arrangements and (2) completes
and executes all reasonable questionnaires, powers of attorney, indemnities,
underwriting agreements and other documents required under the term of such
underwriting arrangements.

                  (i) TRANSFER OF REGISTRATION RIGHTS. Subject to Section 2(k)
of this Agreement and the provisions hereunder, provided that the Company is
given written notice by such Holder at the time of such Transfer stating the
name and address of the transferee and identifying the securities with respect
to which the rights under this Section 2 hereof are being transferred, the
registration rights under this Section 2 hereof may be transferred to any
affiliate of such Holder, to another Holder, or to any Person acquiring at least
fifty percent (50%) of the Registrable Securities or all of such Holder's
Registrable Securities. Any transferee to whom rights under this Section 2 are
transferred shall, as a condition to such Transfers, deliver to the Company a
written instrument by which such transferee agrees to be bound to the
obligations imposed upon the Holders under this Section 2.

                  (j) INDEMNIFICATION.  In the event any Registrable Securities
are included in a registration statement under Section 2 hereof:

                      (i)    To the full extent permitted by law, the Company
will, and hereby does indemnify and hold harmless each Holder, each director,
officer, partner, employee, or agent for each Holder, any underwriter (as
defined in the Securities Act) for each Holder, and each Person, if any, who
controls each Holder or underwriter within the meaning of the Securities Act,
against any losses, claims, damages or liabilities, joint or several, to which
they


                                      -7-
<PAGE>


may become subject under the Securities Act and applicable state securities laws
insofar as such losses, claims, damages or liabilities (or actions in respect
thereof) arise out of or are based on any untrue or alleged untrue statement of
any material fact contained in such registration statement, including any
preliminary prospectus or final prospectus contained therein or any amendments
or supplements thereto, or arise out of or are based upon the omission or
alleged omission to state therein a material fact required to be stated therein
in light of the circumstances under which they were made or necessary to make
the statements therein not misleading or arise out of any violation by the
Company of any rule or regulation promulgated under the Securities Act
applicable to the Company and relating to action or inaction required of the
Company in connection with any such registration; and will reimburse each such
Person for any legal or other expenses reasonably incurred by them in connection
with investigating or defending any such loss, claim, damage, liability, or
action; PROVIDED, HOWEVER, that the indemnity agreement contained in this
Section 2(j)(i) shall not apply to amounts paid in settlement of any such loss,
claim, damage, liability, or action if such settlement is effected without the
consent of the Company (which consent shall not be unreasonably withheld or
delayed) nor shall the Company be liable to a Holder, underwriter or controlling
Person for any such loss, claim, damage, liability or action to the extent that
it arises out of or is based upon an untrue statement or an alleged untrue
statement or omission or alleged omission made in connection with such
registration statement, preliminary prospectus, final prospectus, or amendments
or supplements thereto, in reliance upon and in conformity with written
information furnished expressly for use in connection with such registration by
or on behalf of such Holder, underwriter or controlling Person.

                      (ii)   To the full extent permitted by law, each Holder
will, severally and not jointly, indemnify and hold harmless the Company, each
of its directors, each of its officers who have signed the registration
statement, each person, if any, who controls the Company within the meaning of
the Securities Act, and any underwriter for the Company (within the meaning of
the Securities Act), against any losses, claims, damages or liabilities, joint
or several, to which the Company or any such director, officer, controlling
Person or underwriter may become subject, under the Securities Act and
applicable state securities laws, insofar as such losses, claims, damages or
liabilities (or actions in respect thereof) arise out of or are based upon any
untrue statement or alleged untrue statement of any material fact contained in
such registration statement, including any preliminary prospectus or final
prospectus contained therein or any amendments or supplements thereto, or arise
out of or are based upon the omission or alleged omission to state therein a
material fact required to be stated therein or necessary to make the statements
therein not misleading in light of the circumstances, in each case to the
extent, but only to the extent, that such untrue statement or alleged untrue
statement or omission or alleged omission was made in such registration
statement, preliminary or final prospectus, or amendments or supplements
thereto, in reliance upon and in conformity with written information furnished
by such Holder expressly for use in connection with such registration; and such
Holder will reimburse any legal or other expenses reasonably incurred by the
Company or any such director, officer, controlling person or underwriter in
connection with investigating or defending any such loss, claim, damage,
liability or action; PROVIDED, HOWEVER, that the indemnity agreement contained
in this Section 2(j)(ii) shall not apply to amounts paid in settlement of any


                                      -8-
<PAGE>


such loss, claim, damage, liability, or action if such settlement is effected
without the consent of such Holder (which consent shall not be unreasonably
withheld or delayed).

               In no event shall the liability of any Holder under this
Section 2(j) be greater than the lesser of (a) his pro rata portion of any
liability based on the total liability of all Participating Holders similarly
situated, or (b) the dollar amount of the gross proceeds received by such
Holder upon the sale of the Registrable Securities giving rise to such
indemnification obligation.

                      (iii)  Promptly after receipt by an indemnified party
under this Section 2(j) of notice of the commencement of any action or knowledge
of a claim that would, if asserted, give rise to a claim for indemnity
hereunder, such indemnified party will, if a claim in respect thereof is to be
made against any indemnifying party under this Section 2(j), notify the
indemnifying party in writing of the commencement thereof or knowledge thereof
and the indemnifying party shall have the right to participate in, and, to the
extent the indemnifying party so desires, jointly with any other indemnifying
party similarly noticed, to assume the defense thereof with counsel mutually
satisfactory to the parties. The failure to notify an indemnifying party
promptly of the commencement of any such action or of the knowledge of any such
claim, if materially prejudicial to his ability to defend such action, shall
relieve such indemnifying party of any liability to the indemnified party under
this Section 2(j), but the omission so to notify the indemnifying party will not
relieve him of any liability that he may have to any indemnified party otherwise
than under this Section.

                      (iv)   If the indemnification provided for in this
Section 2(j) is for any reason, other than pursuant to the terms thereof, held
to be unavailable to an indemnified party in respect of any losses, claims,
damages or liabilities (or actions in respect thereof) referred to therein, then
each indemnifying party shall, in lieu of indemnifying such indemnified party,
contribute to the amount paid or payable by such indemnified party as a result
of such losses, claims, damages or liabilities (or actions in respect thereof)
in such proportion as is appropriate to reflect the relative fault of the
Company and each Holder in connection with the statements or omission which
resulted in such losses, claims, damages, liabilities (or actions in respect
thereof), as well as any other relevant equitable considerations. The relative
fault shall be determined by reference to, among other things, whether the
untrue or alleged untrue statement of a material fact relates to information
supplied by the Company or each Holder and the parties' relative intent,
knowledge, access to information and opportunity to correct or prevent such
statement or omission. The Company and each Holder agree that it would not be
just and equitable if contribution pursuant to this subsection (iv) were
determined by pro rata allocation or by any other method of allocation which
does not take account of the equitable considerations referred to above in this
subsection (iv). The amount paid or payable by an indemnified party as a result
of the losses, claims, damages or liabilities (or actions in respect thereof)
referred to above in this subsection (iv) shall be deemed to include any legal
or other expenses reasonably incurred by such indemnified party in connection
with investigating or defending any such action or claim, but shall be subject,
in the case of a Holder, to the limitation of the second paragraph of
Section 2(j)(ii) above. No Person guilty of fraudulent misrepresentation
within the meaning of Section 11(d) of the Securities Act shall be entitled
to contribution from any Person who was not guilty of such fraudulent
misrepresentation.


                                      -9-
<Page>


                  (k) LOCK UP PERIOD. Each Holder agrees to refrain from selling
or consummating any transfer of any of the Company Shares received pursuant to
the Stock Purchase Agreement for a period of one year following the date of this
Agreement (the "LOCK UP PERIOD"), except for: (i) a voluntary Transfer by a
Holder, during his lifetime, of all or a portion of his Company Shares to his or
her spouse, siblings, children or parents (or to a trust established for the
benefit of any of the foregoing); (ii) any Transfer of Company Shares by a
Holder to the Company, (iii) any Transfer of Company Shares by operation of law
to an executor or administrator or legal representative upon the death of a
Holder; (iv) any Transfer in connection with a transaction to which the Company
or the holders of a majority of the outstanding capital stock of the Company are
a party; or (v) any other Transfer upon the prior written approval of the
Company (such clauses (i)-(v) being referred to as "PERMITTED TRANSFERS"). Where
Company Shares are permitted to be transferred pursuant to this Agreement, it
shall be a condition of any such Transfer that the transferring Holder provide
to the Company, upon written request, an opinion of counsel reasonably
satisfactory to it that such transfer is exempt from all applicable federal or
state securities registration requirements, or in lieu thereof, evidence that
the Company Shares being transferred have been so registered.

                  (l) OBLIGATIONS OF TRANSFEREES. Except as otherwise specified
herein, the restrictions, terms and conditions of this Agreement shall remain in
effect as to all Company Shares now owned beneficially by a Holder, whether or
not disposed of in accordance with the terms and conditions of this Agreement
and whether or not the Company Shares are in the hands of an original Holder or
a transferee permitted under this Agreement, until the expiration of the Lock Up
Period. No disposition of such Company Shares shall be effective unless in
compliance with this Agreement and unless and until the proposed transferee
(including the proposed transferee in a Permitted Transfer) shall acknowledge
and accept the terms and conditions of this Agreement by executing and
delivering a statement to that effect in a form reasonably satisfactory to the
Company. Such transferee, if married, shall also cause his or her spouse to
execute an acknowledgment of the application of this Agreement to such
transferee's Company Shares if requested by the Company. The term "HOLDERS" as
used in this Agreement shall be deemed to include each such transferee thereof
permitted under this Agreement who has delivered all documents required under
this Section 2(l).

         3.       LEGEND ON STOCK CERTIFICATES.  Each certificate representing
shares of Common Stock held by any Holder shall bear the following legend until
the expiration of the Lock Up Period:

         "SALE, TRANSFER, OR HYPOTHECATION OF THE SHARES REPRESENTED BY THIS
         CERTIFICATE IS RESTRICTED BY THE PROVISIONS OF A REGISTRATION RIGHTS
         AGREEMENT AMONG THE COMPANY AND THE RECORD HOLDER OF THIS CERTIFICATE,
         A COPY OF WHICH MAY BE INSPECTED AT THE PRINCIPAL OFFICE OF THE
         COMPANY, AND ALL THE PROVISIONS OF WHICH ARE INCORPORATED BY REFERENCE
         IN THIS CERTIFICATE. THE AGREEMENT PROVIDES FOR A LOCK UP PERIOD AND
         TRANSFER RESTRICTIONS. BY ACCEPTING THE SHARES OF STOCK EVIDENCED


                                      -10-
<PAGE>


         BY THIS CERTIFICATE THE HOLDER OF THIS CERTIFICATE AGREES TO BE BOUND
         BY SAID AGREEMENT."

At any time following the expiration of the Lock Up Period, the Company shall,
at the request of any Holder, issue a replacement certificate, without the
foregoing legend, for the Common Stock held by such Holder.

         4. REMEDIES. In case any one or more of the covenants and/or agreements
set forth in this Agreement shall have been breached by the Company or the
Holders, any of the Holders or the Company (as the case may be) may proceed to
protect and enforce its rights either by suit in equity and/or by action at law,
including, but not limited to, an action for damages as a result of any such
breach and/or an action for specific performance or injunctive relief with
respect to any such covenant or agreement contained in this Agreement.

         5. NOTICES. All notices or requests provided for or permitted to be
given pursuant to this Agreement must be in writing. All notices and other
communications shall be effective upon the earlier of actual receipt thereof by
the person to whom notice is directed or (i) in the case of notices and
communications sent by personal delivery or telecopy, on the day such notice or
communication arrives at the applicable address or was successfully sent to the
applicable telecopy number (or, if the notice or communication arrives or was
successfully sent after 5:00 p.m. on that day, then on the following business
day), (ii) in the case of notices and communications sent by overnight delivery
service, on the first business day following the day such notice or
communication was sent, and (iii) in the case of notices and communications sent
by United States mail, three business days after such notice or communication
shall have been deposited in the United States mail. The addresses of the
parties hereto for all purposes of this Agreement are:

       Company:        PEC Solutions, Inc.
                       12750 Fair Lakes Circle
                       Fairfax, Virginia 22033
                       Attn: Sharon M. Owlett, Vice President Corporate Affairs

       With a copy to: Piper Marbury Rudnick & Wolfe LLP
                       1775 Wiehle Avenue, Suite 400
                       Reston, Virginia 20190-5159
                       Attn: Nancy A. Spangler, Esq.

       Holders:        See SCHEDULE A attached hereto

       With a copy to: Covington & Burling
                       1201 Pennsylvania Avenue, N.W.
                       Washington, DC 2004-2401
                       Attn: Paul V. Rogers, Esq.


                                      -11-
<PAGE>


By giving to the other parties at least five (5) days' written notice thereof,
any party hereto shall have the right from time to time and at any time during
the term of this Agreement to change his respective address and each party shall
have the right to specify as his address any other address within the United
States of America.

         6.       BINDING AGREEMENT.  This Agreement and each provision herein
shall be binding upon and applicable to, and shall inure to the benefit of, the
Holders, their permitted assigns and legal representatives.

         7.       CONSENTS AND WAIVERS.  No consent or waiver, express or
implied, by any party hereto of the breach, default or violation by any other
party hereto of his obligations hereunder shall be deemed or construed to be a
consent or waiver to or of any other breach, default or violation of the same or
any other obligations of such party hereunder. Failure on the part of any party
hereto to complain of any act of any of the other parties or to declare any of
the other parties hereto in default, irrespective or how long such failure
continues, shall not constitute a waiver by such party of his rights hereunder.

         8.       APPLICABLE LAW.  This Agreement and all questions relating to
its validity, interpretation and performance shall be governed by and construed
in accordance with the laws of the State of Delaware.

         9.       PRIOR AGREEMENTS; AMENDMENTS.  This Agreement supersedes any
prior or contemporaneous understanding or agreement among the parties respecting
the subject matter hereof. There are no arrangements, understandings or
agreements, oral or written, among the parties hereto relating to the subject
matter of this Agreement, except those fully expressed herein or in documents
executed contemporaneously herewith. No change or modification of this Agreement
shall be valid or binding upon the parties hereto unless such change or
modification or waiver shall be in writing and signed by the Holders holding a
majority of the Registrable Securities, and such change or modification shall be
binding on all holders of Registrable Securities.

         10.      COUNTING OF DAYS.  In computing the number of days for
purposes of this Agreement, all days shall be counted, including Saturdays,
Sundays and holidays; PROVIDED, HOWEVER, that if the final day of any time
period falls on a Saturday, Sunday or holiday, then the final day shall be
deemed to be the next day which is not a Saturday, Sunday or holiday.

         11.      CAPTIONS.  The captions used in this Agreement are for
convenience only and shall not be construed in interpreting this Agreement.
Whenever the context so required, the neuter shall include the feminine and
masculine, and the singular shall include the plural, and conversely.

         12.      HEADINGS.  All section headings herein have been inserted for
convenience of reference only and shall in no way modify or restrict any of the
terms or provisions hereof.


                                      -12
<PAGE>


         13.      COUNTERPARTS.  This Agreement may be signed in any number of
counterparts, each of which shall be an original for all purposes, but all of
which taken together shall constitute only one agreement. This Agreement shall
become binding when one or more counterparts hereof, individually or taken
together, shall bear the signatures of all of the parties reflected hereon as
the signatories.

                         [***SIGNATURE PAGES FOLLOW***]





                                      -13-
<PAGE>


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

THE COMPANY:
PEC SOLUTIONS, INC.



By:      /s/ DAVID C. KARLGAARD
         -------------------------
Name:    David C. Karlgaard
Its:     President







                [SIGNATURE PAGE TO REGISTRATION RIGHTS AGREEMENT]


<PAGE>


THE HOLDERS:


By:      /s/ K. DAVID BOYER, JR.
         ------------------------------
Name:    K. David Boyer, Jr.



By:      /s/ FELICITY G. BELFORD BOYER
         ------------------------------
Name:    Felicity G. Belford Boyer



By:      /s/ K. DAVID BOYER, JR.            and      /s/ DEBORAH D. COCHRAN
         ------------------------------              ----------------------
Its:     K. David Boyer, Jr., Trustee                Deborah D. Cochran, Trustee
         Felicity G. Belford Irrevocable Trust



By:      /s/ FELICITY G. BELFORD            and      /s/ DEBORAH D. COCHRAN
         ------------------------------              ----------------------
Its:     Felicity G. Belford, Trustee                Deborah D. Cochran, Trustee
         Boyer/Belford Family Trust



By:      /s/ FELICITY G. BELFORD            and      /s/ DEBORAH D. COCHRAN
         ------------------------------              ----------------------
Its:     Felicity G. Belford, Trustee                Deborah D. Cochran, Trustee
         Khalan T. Boyer Trust (2000)



By:      /s/ FELICITY G. BELFORD            and      /s/ DEBORAH D. COCHRAN
         ------------------------------              ----------------------
Its:     Felicity G. Belford, Trustee                Deborah D. Cochran, Trustee
         Tess M. Boyer Trust (2000)


                                      A-1