Puzzles/Logic puzzles/Scales and Weights

In front of you is a balance. Your task is to devise a system, using 4 weights, so that any whole number of kilograms can be weighed up to n kg, where n should be the largest possible.

Example: Suppose you use these weights: 1 kg, 2 kg, 4 kg, 8 kg. This way you can weigh any weight up to n=15 kg by combining these weights.

1 kg = 1 kg

2 kg = 2 kg

3 kg = 2 kg + 1 kg

...

14 kg = 8 kg + 4kg + 2 kg

15 kg = 8 kg + 4 kg + 2 kg + 1 kg

Solutions: Up to 40 kg | Up to 80kg