Adding 6-bit Coding to LEICA M Lenses

LEICA M10-P White Edition with LEICA ELMARIT-M 90mm f/2.8

Even though it does not have any impact on optical performance whatsoever, I really like LEICA M lenses to be 6 bit coded. Also among used lenses, this is often a reason for premium pricing, so I try to get coded lenses whenever feasible. However some may not have it and I still want it. Why that is and 6 bit coding can be done to even vintage lenses from the 1960ies? Let’s have a look.

6 bit coding of LEICA lenses

In 2006 LEICA announced that from July 2006 onwards, all new LEICA lenses would come with 6 bit encoding. Sounding more sophisticated than it actually is, it involved 6 fields in the bayonet ring being marked in black or white to represent a number from 0 to 64 in binary code. The new feature was added alongside the introduction of the LEICA M8, their first digital rangefinder camera. Digital LEICA cameras can since read this data with an optical sensor and identity the lens based on its code. Most critically it is used to write EXIF data into the image file by adding the correct lens information, which otherwise would be an unknown lens. In addition, the information is used for in body image optimization, for example correcting lens distortions etc. However, this is something easily done also in Lightroom or other image processing tools.

Digital Leica cameras also allow the lens to be manually picked when an uncoded lens is mounted, however this is error prone as it as step that is easy to forget. Especially when using multiple uncoded lenses, lack of attention might result in wrong lens information being written into image files. So having a 6 bit coded lens is not just modern and what you want, it is also really convenient.

When LEICA introduced the change, all current lenses were updated and sold with 6 bit coding moving forward. At the time, this was a list of about 10 lenses that has grown significantly since then. In addition, Leica also offered to update discontinued lenses, since they regard system compatibility as a vital virtue. This led to lenses introduced even in 1963 ending up with 6 bit coding.

How to add 6 bit coding?

For any lens older than 2006, adding the 6 bit coding is an option to consider. LEICA offers this as a convenient service but for some older lenses this might not be the best option. Even if this can be done for few hundred EUR, it would be a substantial investment in a vintage lens that just adds convenience more than anything else.

There are also some alternative options around. For example, you can print a card board stencil and then add the coloring at the appropriate spot with a pen or marker. Even though this is very low threshold approach, it actually works quite well. The only issues are that the paint comes in contact with the sensor. This may lead to color transference and in any case to markings being removed by the friction over time. So with this approach, markings have to be added again from time to time. If there is any long term implication for the sensor, I do not know. To me however, if doesn’t feel like the best thing to do.

Another alternative is to replace the mount flange with a third party flange that has empty 6 bit markings. These can than be colored to match any 6 bit coding needed. Such flanges are produced by various people with divergent quality and can easily be found on eBay. They usually coast around 15-25 EUR plus shipping.

blank 6 bit coding M-mount flange for 28 and 90 mm M-mount lenses
blank 6 bit coding M-mount flange for 28 and 90 mm M-mount lenses

When searching for a matching flange, it is critical to pay close attention to the exact design of the mount flange for the particular lens. Many are very similar, but there are considerable differences. For most lenses, adapter flanges are easy to be found. They can be matched by either carefully matching the photos to the design of the lens or by consulting LEICA lens model numbers. Most offers name the exact model numbers they are suitable for. Many sellers also reconfirm with buyers to make sure to send the correct adapter. In general, it has no impact on price.

With this blank 6 bit mount flange, all you need is a screwdriver and something to color the markings. You can start with using a black pen or marker. If you want to get serious, you can of course also get some sophisticated paint like Revell EMAIL COLOR White RAL 9010 (glossy) und Revell EMAIL COLOR black RAL 9011 (matte). With a little effort it can literally look like the real thing.

Replacing the flange with a #4/0 Phillips precision screwdriver takes few minutes and has been described in great detail, for example on or The only question left would be to identify the correct 6 bit code for the lens.

How to determine the correct 6 bit coding?

Lenses with a removable mount flange, can most likely be updated. Only requirement is that a 6 bit code exists for that lens. The 6 bit code can be read clockwise and black is read as 1 and white as 0. This means with the 6 bit coding at a 12 o’clock position, the code is read from left to right and is 011100 for a LEICA ELMARIT-M 28mm f/2.8 ASPH for example (see below).

Following list shows LEICA M lenses and the 6 bit coding used to identify them. For some lenses, there are multiple model numbers available which can be related to different finishes (e.g black and chrome) or different versions of lens with identical optical design. As a result, multiple model numbers may share the same 6 bit code. This is also visible in any LEICA camera when manually selecting an uncoded lens. In such a case, the menu displays multiple model numbers in addition to the lens specification.

LEICA M lensModel NoProduction Years6 Bit Code
Tri-Elmar-M 16-18-21mm f/4 ASPH116262006-today010000
Super-Elmar-M 18mm f/3.8 ASPH116492009-today110100
Super-Elmar-M 21mm f/3.4111452011-today110011
Elmarit-M 21mm f/2.8111341980-1997000001
Elmarit-M 21mm f/2.8 ASPH11135,
11897 (chrome)
Summilux-M 21mm f/1.4 ASPH116472008-today101111
Elmar-M 24mm f/3.8 ASPH116482008-today110010
Elmarit-M 24mm f/2.8 ASPH11878,
11898 (chrome)
Summilux-M 24mm f/1.4 ASPH116012008-today110000
Tri-Elmar-M 28-35-50mm f/4 ASPH11890, 11625,
11894 (chrome)
Elmarit-M 28mm f/2.8 (III)118041979-1993000011
Elmarit-M 28mm f/2.8 (IV)118091992-2006011011
Elmarit-M 28mm f/2.8 ASPH116062006-today011100
Summicron-M 28mm f/2 ASPH116042000-today011010
Summarit-M 35mm f/2.5116432007-2014101011
Summicron-M 35mm f/2 (IV)11310,
11311 (chrome)
Summicron-M 35mm f/2 ASPH11879,
11882 (chrome)
Summilux-M 35mm f/1.4 ASPH11874,
11883 (chrome)
Summilux-M 35mm f/1.4 ASPH (FLE)116632010-today011101
Elmar-M 50mm f/2.811831, 11824,
11823 (chrome)
Summarit-M 50mm f/2.5116442007-2014101100
Summicron-M 50mm f/2 (III)118171969-1979010111
Summicron-M 50mm f/2 (IV, V)11819, 11826
11825, 11816 (chrome)
1979-1994 (IV)
1994-2013 (V)
APO-Summicron-M 50mm f/2 (VI)111412013-today110101
Summilux-M 50mm f/1.4 (II)11868,
11856 (chrome)
Summilux-M 50mm f/1.4 ASPH11891,
11892 (chrome)
Noctilux-M 50mm f/111821, 118221976-2008011111
Noctilux-M 50mm f/0.95 ASPH116022008-today110001
Summarit-M 75mm f/2.5116452007-today101101
APO-Summicron-M 75mm f/2 ASPH116372005-today100100
Summilux-M 75mm f/1.411810, 11814, 118151980-2005100011
Macro-Elmar-M 90mm f/411633,
11634 (chrome)
Tele-Elmarit-M 90mm f/2.8 (II)118001974-1990000100
Elmarit-M 90mm f/2.811807,
11808 (chrome)
Summarit-M 90mm f/2.5116462008-today101110
Summicron-M 90mm f/2 (II)11136,
11137 (chrome)
APO-Summicron-M 90mm f/2 ASPH11884,
11885 (chrome)
Elmarit-M 135mm f/2.8 (I/II)118291963-1977 (I)
1977-1998 (II)
APO-Telyt-M 135mm f/3.4118891998-today110101

The list is based on data provided on that is also credited to Carsten Whimster, Sean Reid, Jan Dvorak, Santa Stella and others. It has been augmented with data collected from lenses I owned or rented. If you think something is missing, let me know.

Using a 6 bit blank M-mount flange

In this example, I am using a blank 6 bit M-mount flange and code it for a LEICA ELMARIT-M 90mm f/2.8 lens. According the list, the correct 6 bit code is 100110. For initial testing I just used a Faber Castell Pit Artisan Pen Brush to color the markings for 1 in black. Then, using the #4/0 Phillips precision screwdriver, the original mount flange can be removed by unscrewing the 6 screws that fixate the flange. There is not much than can go wrong. Even if the lens housing is moved, the wholes in the mount ensure that everything will be back in place as there is only one way to screw it back together.

Really anyone can do it and it only takes few minutes. When putting the screws back in, they should not be tighten very much. Just not being loose is perfect. If the camera correctly detects the lens, I would consider using more sophisticated paint to make it look like the real deal.

Mounting a custom flange

Once the coding is done and the customized mount flange has been put on the lens, it is good to go. When putting the lens on the camera mount, be aware of any friction or tightness as the custom made lens flanges sometimes are not super precise. I did not encounter any that didn’t fit, but some are really tight. If you are worried about damaging the mount, I would recommend trying another flange form a different provider.

When the lens is put on, the lens is detected automatically. In the lens detection settings of the camera, the settings can be checked for any issues. In my case, the LEICA M10-P White Edition correctly detects the LEICA ELMARIT-M 90mm f/2.8 lens. So with just 15 minutes of effort, no more worries about correct EXIF meta data written in my image files.

NWK 2020/2021 confrence proceedings
Prev Paper on Entrepreneurship Policy Discourse and its Network of Actors in Hamburg, Germany

Leave a comment

I accept that my given data and my IP address is sent to a server in the USA only for the purpose of spam prevention through the Akismet program.More information on Akismet and GDPR.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

No Right Click, Sorry.