Define the integer variable. Use the commands and syntax of your preferred coding language to identify the variable on which you wish to perform the right shift. For example, in Java the variable "a" can be defined by "int a = 54."
Perform the right shift. Follow the syntax for your coding language to perform the right shift on the variable. Specify the number of bits to shift to the right as four. For example, in Java the code "a = a >> 4" redefines the variable "a" from step 1 as 54 shifted to the right four bits.
Print the resultant integer variable using the commands and syntax of your coding language. For example, in Java the code "System.out.printLn(a = a>>4)" displays the variable "a" after shifting it four bits to the right. In this example, 54 shifted to the right four bits equals 13.