<Page>

                                                                    Exhibit 10.4


                       SHARE PURCHASE AND OPTION AGREEMENT

This Share Purchase and Option Agreement (the "AGREEMENT") is made and entered
into on the 4th day of May, 1998, by and among:

      (i)   GIVEN IMAGING LTD. (PC #51-257802-2) A private company, incorporated
            under the laws of the State of Israel, of Building 7B, New
            Industrial Park, P.O.Box 258, Yokneam 20692,
            ISRAEL
            (hereinafter, the "COMPANY")

                                                              ON THE FIRST PART;

      (ii)  DISCOUNT INVESTMENT CORPORATION LTD. A public company, incorporated
            under the laws of the State of Israel, of 14 Beit Hashoeva Lane,
            P.O.Box 1688, Tel-Aviv 61016, ISRAEL (hereinafter, "DIC")

                                                             ON THE SECOND PART;

      (iii) PEC ISRAEL ECONOMIC CORPORATION A public company, incorporated under
            the laws of the state of Maine, U.S.A., of 511 Fifth Avenue, New
            York City, NY 10017, U.S.A. (hereinafter, "PEC")


                                                              ON THE THIRD PART;

            and

      (iv)  ELRON ELECTRONIC INDUSTRIES LTD. A public company, incorporated
            under the laws of the State of Israel, of Advanced Technology
            Center, P.O.Box 1573, Haifa 31015 (hereinafter, "ELRON")

                                                             ON THE FOURTH PART;


                               W I T N E S S E T H

      WHEREAS, the Company has entered with ThermoTrex Corporation, a Delaware
corporation ("TTC"), into a Share Purchase and Option Agreement, in the form
attached hereto as EXHIBIT A (the "TTC AGREEMENT"), under which TTC shall invest
in the Company an amount of (US) $300,000 in consideration for a five percent
(5%) equity interest in the Company, and has two options to invest in the
Company additional amounts of (US) $375,000 and (US) $2,250,000 respectively,

<Page>
                                       2


each in consideration for a five percent (5%) equity interest in the Company,
all as set forth in the TTC Agreement; and

      WHEREAS, DIC, PEC and Elron (collectively, the "DEP GROUP") and the
Company are desirous of also entering into an agreement among them for the
investment in the Company by the DEP Group in consideration for shares and
options on the same terms and conditions as the investment by TTC under the TTC
Agreement (excluding certain provisions), all as provided below;

      NOW, THEREFORE, the parties hereto agree as follows:

      1. THE TRANSACTION IN GENERAL. The parties hereby agree that, under the
terms and conditions set forth in the TTC Agreement, of which certain provisions
are incorporated herein pursuant to Section 2 below, the DEP Group collectively
shall invest in the Company such amount, acquire such number of Ordinary Shares
and shall be granted such options to further invest in the Company, as the
amount invested by TTC, the number of Ordinary Shares acquired thereby and the
options granted thereto, and all under the same terms and conditions as set
forth under the TTC Agreement. The rights and obligations of each of DIC, PEC
and Elron shall be equally divided among them, to the effect that each shall be
entitled and/or obligated, as the case may be, to invest one third of the
amounts, acquire one third of the Ordinary Shares and have one third of the
rights under each option, out of the total amounts to be invested, Ordinary
Shares to be acquired and option rights to be granted hereunder to the DEP Group
as a whole. The capitalization table attached hereto as SCHEDULE B-1 sets forth
the Ordinary Shares to be issued to the DEP Group (as a whole) and to TTC,
assuming (for illustration purpose only) the eventual exercise of all options by
the DEP Group and TTC, and the capitalization table attached hereto as SCHEDULE
B-2 sets forth the same, assuming also (for illustration purpose only) the issue
of all non-voting Ordinary A' Shares currently reserved for the Company's 1998
Option Plan.

      2. ADOPTION OF THE TTC AGREEMENT. Subject to Section 3 below, the TTC
Agreement is hereby incorporated into this Agreement by way of reference, to the
effect that the DEP Group and the Company hereby enter into an agreement in the
same form and substance as the TTC Agreement and in which the parties of the DEP
Group shall be parties in TTC's stead, severally and not jointly.

      3. EXCLUSIONS. Notwithstanding any of the foregoing, Sections 3 to 8,
9.01(c), 9.02(a), 9.02(c), 9.04, 9.05, 9A, and 12 of the TTC Agreement are not
incorporated herein and shall not apply among the parties hereto.

      4. COUNTERPARTS. This Agreement may be executed in one or more
counterparts, each of which shall be deemed to be an original, but all of which
shall be one and the same document.

<Page>
                                       3


      IN WITNESS WHEREOF, the parties have caused this Share Purchase and Option
Agreement to be duly executed and delivered upon the date first above written.



      GIVEN IMAGING LTD.

      By:  /s/ Z. Ben David
          ------------------------
          Name:  Z. Ben David
          Title: Director



      DISCOUNT INVESTMENT
      CORPORATION LTD.

      By: /s/ [Illegible]
          ------------------------
          Name:
          Title:



      PEC ISRAEL ECONOMIC
      CORPORATION

      By:  /s/ James I. Edelson
          ------------------------
          Name:  James I. Edelson
          Title: Executive Vice President



      ELRON ELECTRONIC INDUSTRIES LTD.

      By: /s/  [Illegible]
          ------------------------
          Name:
          Title: