Section4 – Extension of Code to extra-territorial offences.

The provisions of this Code apply also to any offence committed by—
(1) any citizen of India in any place without and beyond India;
(2) any person on any ship or aircraft registered in India wherever it may be.
*(3) any person in any place without and beyond India committing offence targeting a computer
resource located in India.
*[Explanation.—In this section— (a) the word “offence” includes every act committed outside India which, if committed in India, would be punishable under this Code;
(b) the expression “computer resource” shall have the meaning assigned to it in clause (k) of
sub-section (1) of section 2 of the Information Technology Act, 2000 (21 of 2000);]
Illustration
A, who is a citizen of India, commits a murder in Uganda. He can be tried and convicted of murder in any place in India in which he may be found.

*[Sub-clause (3) inserted and Explanation substituted with Information Technology Amendment Act, 2008]

Section6 – Definitions in the Code to be understood subject to exceptions.

Throughout this Code every definition of an offence, every penal provision, and every illustration of every such definition or penal provision, shall be understood subject to the exceptions contained in the Chapter entitled “General Exceptions”, though those exceptions are not repeated in such definition, penal provision, or illustration.
Illustrations
(a) The sections, in this Code, which contain definitions of offences, do not express that a child under seven years of age
cannot commit such offences; but the definitions are to be understood subject to the general exception which provides that
nothing shall be an offence which is done by a child under seven years of age.
(b) A, a police-officer, without warrant, apprehends Z, who has committed murder. Here A is not guilty of the offence of
wrongful confinement; for he was bound by law to apprehend Z, and therefore the case falls within the general exception which
provides that “nothing is an offence which is done by a person who is bound by law to do it”.