{"id":470,"date":"2024-09-18T11:46:44","date_gmt":"2024-09-18T10:46:44","guid":{"rendered":"https:\/\/blog.powered-up-games.com\/wordpress\/?p=470"},"modified":"2024-09-18T13:14:49","modified_gmt":"2024-09-18T12:14:49","slug":"delving-too-deeply","status":"publish","type":"post","link":"https:\/\/powered-up-games.com\/blog\/wordpress\/archives\/470","title":{"rendered":"Delving too deeply"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">What happens if you try to negate the smallest 32 bit integer in c#?<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.75rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(1 * 0.6 * .75rem);line-height:1rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#39404f;color:#c8d0e0\">C#<\/span><span role=\"button\" tabindex=\"0\" data-code=\"void Start()\n{\n    print(-int.MinValue);\n}\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #81A1C1\">void<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">Start<\/span><span style=\"color: #ECEFF4\">()<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #88C0D0\">print<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #81A1C1\">-int<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #D8DEE9\">MinValue<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">If you try to compile this code, the compiler will helpfully emit error code <a href=\"https:\/\/learn.microsoft.com\/en-us\/dotnet\/csharp\/misc\/cs0220\">CS0220<\/a>: the operation overflows.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, if you wrap it in a function:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.75rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#d8dee9ff;--cbp-line-number-width:calc(1 * 0.6 * .75rem);line-height:1rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#39404f;color:#c8d0e0\">C#<\/span><span role=\"button\" tabindex=\"0\" data-code=\"int Negate(int value)\n{\n    return -value;\n}\n\nvoid Start()\n{\n    print(Negate(int.MinValue));\n}\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #81A1C1\">int<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">Negate<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #81A1C1\">int<\/span><span style=\"color: #D8DEE9FF\"> value<\/span><span style=\"color: #ECEFF4\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">return<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">-<\/span><span style=\"color: #D8DEE9\">value<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\">}<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">void<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">Start<\/span><span style=\"color: #ECEFF4\">()<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #88C0D0\">print<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #88C0D0\">Negate<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #81A1C1\">int<\/span><span style=\"color: #ECEFF4\">.<\/span><span style=\"color: #D8DEE9\">MinValue<\/span><span style=\"color: #ECEFF4\">))<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">It compiles without errors.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But what does it do?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The value of <code><strong>int.MinValue<\/strong><\/code> is -2,147,483,648. So, you might expect it would return 2,147,483,648.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But, <code><strong>int.MaxValue<\/strong><\/code> is 2,147,483,647. That is one less than the value it would need. Accounting for that, you might think it would either throw an exception, or return 2,147,483,647.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In fact it returns -2,147,483,648.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The same behaviour happens with smaller integer representations like <code><strong>short <\/strong><\/code>and <code><strong>sbyte<\/strong><\/code>, returning -32,768 and -128 respectively.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To see why this is the case, it&#8217;s helpful to know how numbers are stored. For example, an 8 bit <code><strong>byte<\/strong><\/code> value has (as it&#8217;s name suggests) 8 bits, each of which can be either 0 or 1.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To work out how many combinations this gives us, start with 1 bit. With 1 bit we have two possible combinations: the bit is either 0 or 1. Each bit we add, doubles the combinations, since we have all the combinations we had before with the new bit set to 0, and again with the new bit as 1. Do that 8 times and we end up with 256 possible combinations in 8 bits.<\/p>\n\n\n\n<div class=\"wp-block-katex-display-block katex-eq\" data-katex-display=\"true\"><pre>\\begin{align*}\n\\square &amp;= \\text{2 combinations} \\\\\n\\square\\square &amp;= \\text{4 combinations} \\\\\n\\square\\square\\square &amp;= \\text{8 combinations} \\\\\n\\square\\square\\square\\square &amp;= \\text{16 combinations} \\\\\n\\square\\square\\square\\square\\square &amp;= \\text{32 combinations} \\\\\n\\square\\square\\square\\square\\square\\square &amp;= \\text{64 combinations} \\\\\n\\square\\square\\square\\square\\square\\square\\square &amp;= \\text{128 combinations} \\\\\n\\square\\square\\square\\square\\square\\square\\square\\square &amp;= \\text{256 combinations} \\\\\n\\end{align*}<\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">If you keep going, you will reach 65,536 for 16 bits, and 4,294,967,296 for 32 bits.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img decoding=\"async\" src=\"https:\/\/i.giphy.com\/media\/v1.Y2lkPTc5MGI3NjExcjFkeHBzd29waWJ2cTBrdTNxZ3hsejR4NWxuMjNkaml4em1rbzF2cyZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw\/ULyYV5amK2eYM\/giphy.gif\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Now, if we need to represent both positive and negative numbers, we need to divide up those combinations somehow. So we take half of the combinations for the positive numbers and half for the negative.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, that does leave an odd one out. What do we do with zero? Zero is not strictly positive or negative. But we have to assign it one way or another. And it seems only logical that the combination for zero ought to be all zeros.<\/p>\n\n\n\n<div class=\"wp-block-katex-display-block katex-eq\" data-katex-display=\"true\"><pre>\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0} = 0<\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">And if we follow the convention for our normal number system, then positive one should be all zeros followed by a one on the right.<\/p>\n\n\n\n<div class=\"wp-block-katex-display-block katex-eq\" data-katex-display=\"true\"><pre>\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{1} = 1<\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">This gives us the desirable property, that we can add these numbers just by adding the bits. This works fine for 0 and 1, but what happens when we want to add 1 and 1? In that case, we follow the same rules as we do for normal numbers and carry 1 to the left. And so we can keep assigning numbers until we run out of bits.<\/p>\n\n\n\n<div class=\"wp-block-katex-display-block katex-eq\" data-katex-display=\"true\"><pre>\\begin{align*}\n\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0} &amp;= 0 \\\\\n\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{1} &amp;= 1 \\\\\n\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{1}\\fbox{0} &amp;= 2 \\\\\n\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{1}\\fbox{1} &amp;= 3 \\\\\n\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{1}\\fbox{0}\\fbox{0} &amp;= 4 \\\\\n... \\\\\n\\fbox{0}\\fbox{1}\\fbox{1}\\fbox{1}\\fbox{1}\\fbox{1}\\fbox{1}\\fbox{0} &amp;= 126 \\\\\n\\fbox{0}\\fbox{1}\\fbox{1}\\fbox{1}\\fbox{1}\\fbox{1}\\fbox{1}\\fbox{1} &amp;= 127 \\\\\n\n\\end{align*}<\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">But when we reach 127 we have already used half of our combinations and we still need to represent the negatives.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">One thing you might notice at this point, is that all of our positive numbers so far have a 0 in the leftmost bit. We can use this to quickly check that our number is positive. (Or at least zero.)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So for the negative numbers, the leftmost bit should be 1. And again it would be nice if in our representation when we add 1, it should give us the next number up. To start, we would need a representation for -1 such that adding 1 to it would naturally give us the representation for 0.<\/p>\n\n\n\n<div class=\"wp-block-katex-display-block katex-eq\" data-katex-display=\"true\"><pre>\\begin{align*}\n\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{1} \\\\\n+ \\fbox{1}\\fbox{?}\\fbox{?}\\fbox{?}\\fbox{?}\\fbox{?}\\fbox{?}\\fbox{?} \\\\\n=\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0} \\\\\n\\end{align*}<\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">If we start at the right hand side, the first bit can&#8217;t be a zero, since that would leave a 1 in the result. So it must be a 1. But that would mean carrying 1 to the next position. So that bit would also need to be a 1 or it would put a 1 in the result. This continues all the way to the right until we carry 1 but we don&#8217;t have anywhere to put it. They all rolled over and one fell out, leaving us with all zeros.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">they all rolled over and one fell out<\/p>\n<cite>\u2014 traditional nursery rhyme<\/cite><\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">With -1 defined, we can proceed as before, subtracting one each time until we run out of combinations:<\/p>\n\n\n\n<div class=\"wp-block-katex-display-block katex-eq\" data-katex-display=\"true\"><pre>\\begin{align*}\n\\fbox{1}\\fbox{1}\\fbox{1}\\fbox{1}\\fbox{1}\\fbox{1}\\fbox{1}\\fbox{1} &amp;= -1 \\\\\n\\fbox{1}\\fbox{1}\\fbox{1}\\fbox{1}\\fbox{1}\\fbox{1}\\fbox{1}\\fbox{0} &amp;= -2 \\\\\n\\fbox{1}\\fbox{1}\\fbox{1}\\fbox{1}\\fbox{1}\\fbox{1}\\fbox{0}\\fbox{1} &amp;= -3 \\\\\n\\fbox{1}\\fbox{1}\\fbox{1}\\fbox{1}\\fbox{1}\\fbox{1}\\fbox{0}\\fbox{0} &amp;= -4 \\\\\n\\fbox{1}\\fbox{1}\\fbox{1}\\fbox{1}\\fbox{1}\\fbox{0}\\fbox{1}\\fbox{1} &amp;= -5 \\\\\n... \\\\\n\\fbox{1}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{1} &amp;= -127 \\\\\n\\fbox{1}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0} &amp;= -128 \\\\\n\\end{align*}<\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Now we have assigned all of the combinations in an order that allows us to use our common arithmetic rules. We end up with 1 more negative number than positive numbers because we needed to represent zero somewhere.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But what happens now if we subtract 1 from -128, or add 1 to 127?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If we add 1 to 127, we end up with a bit overflowing into the negative bit. The negative bit changes from 0 to 1 and the result becomes -128.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If we subtract 1 from -128, the opposite happens: the 1 is borrowed out of the negative bit, turning it into positive 127.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now we know all this, can we see why negating -128 would cause it to remain -128?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If we pair up the positive and negative number representations, we can see that there is a certain symmetry there:<\/p>\n\n\n\n<div class=\"wp-block-katex-display-block katex-eq\" data-katex-display=\"true\"><pre>\\begin{align*}\n\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0} &amp;= 0 \\\\\n\\fbox{1}\\fbox{1}\\fbox{1}\\fbox{1}\\fbox{1}\\fbox{1}\\fbox{1}\\fbox{1} &amp;= -1 \\\\\n\\\\\n\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{1} &amp;= 1 \\\\\n\\fbox{1}\\fbox{1}\\fbox{1}\\fbox{1}\\fbox{1}\\fbox{1}\\fbox{1}\\fbox{0} &amp;= -2 \\\\\n\\\\\n\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{1}\\fbox{0} &amp;= 2 \\\\\n\\fbox{1}\\fbox{1}\\fbox{1}\\fbox{1}\\fbox{1}\\fbox{1}\\fbox{0}\\fbox{1} &amp;= -3 \\\\\n\\\\\n\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{0}\\fbox{1}\\fbox{1} &amp;= 3 \\\\\n\\fbox{1}\\fbox{1}\\fbox{1}\\fbox{1}\\fbox{1}\\fbox{1}\\fbox{0}\\fbox{0} &amp;= -4 \\\\\n\\end{align*}<\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">It seems that for every negative number, the opposite representation in terms of its bits is the positive equivalent minus 1. And this pattern continues for every negative number. So to negate any number in our representation, all we need to do is flip all the bits and then add 1.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">And it works for all the numbers in the representation. The problem is, with the number -128, it returns 127 + 1. And, as we saw above, 127 + 1 wraps back around to -128. So we end up back where we started.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">And the same thing happens with the 16 bit and 32 bit numbers.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So be aware of that when negating at the negative limit of your number representation.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img decoding=\"async\" src=\"https:\/\/i.giphy.com\/media\/v1.Y2lkPTc5MGI3NjExcnhwcWxsb3Q2MWI0aWViZzBzdjdtcnlzdWM0OHEzMXY4YnNieXhieiZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw\/LomYTroqvpZKnmNIfh\/giphy.gif\" alt=\"\"\/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>What happens if you try to negate the smallest 32 bit integer in c#?<\/p>\n","protected":false},"author":1,"featured_media":470,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[62,6],"tags":[24,39],"class_list":["post-470","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-education","category-programming","tag-education","tag-programming"],"_links":{"self":[{"href":"https:\/\/powered-up-games.com\/blog\/wordpress\/wp-json\/wp\/v2\/posts\/470","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/powered-up-games.com\/blog\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/powered-up-games.com\/blog\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/powered-up-games.com\/blog\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/powered-up-games.com\/blog\/wordpress\/wp-json\/wp\/v2\/comments?post=470"}],"version-history":[{"count":10,"href":"https:\/\/powered-up-games.com\/blog\/wordpress\/wp-json\/wp\/v2\/posts\/470\/revisions"}],"predecessor-version":[{"id":481,"href":"https:\/\/powered-up-games.com\/blog\/wordpress\/wp-json\/wp\/v2\/posts\/470\/revisions\/481"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/powered-up-games.com\/blog\/wordpress\/wp-json\/wp\/v2\/posts\/470"}],"wp:attachment":[{"href":"https:\/\/powered-up-games.com\/blog\/wordpress\/wp-json\/wp\/v2\/media?parent=470"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/powered-up-games.com\/blog\/wordpress\/wp-json\/wp\/v2\/categories?post=470"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/powered-up-games.com\/blog\/wordpress\/wp-json\/wp\/v2\/tags?post=470"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}