The coding plug allows BMW to minimize the number of different ecus it has to stock. Each ECU can run 8 different motorcycles.
There are different intake tubes, exhausts, heads, cam shafts, compression ratios and octane specs for the various models of R1100, R1150, etc.
The coding plug consists of four wires. One is ground and three are inputs to the Motronic. By grounding the three Motronic inputs in various combinations the coding plug can select one of 8 sets of maps in the Motronic. Each set of maps is roughly 75 maps/tables. In other words the coding plug selects the set of 75 tables that are right for your bike.
On the r1150 all maps are equally fueled. That is to say they all end up producing the same afr because fueling is controlled by the setting of the O2 sensor, not the coding plug.
For the R1150GS,
No plug means closed loop fueling for US+ECE regular fuel
Yellow plug means closed loop us+ECE 91 Oktane
A 30-87a plug means closed loop Japan octane
Get the best result by using the stock plug designed for your bike.
P.S. On the R1150 Pin 86 is not a low octane pin. It can mean Japan R1150 RT or R1100S depending on what other pins are used with it.