{"id":2368,"date":"2023-05-19T19:56:48","date_gmt":"2023-05-19T10:56:48","guid":{"rendered":"http:\/\/attacktube.com\/?p=2368"},"modified":"2023-05-20T16:45:16","modified_gmt":"2023-05-20T07:45:16","slug":"%e3%80%90c%e8%a8%80%e8%aa%9e%e3%80%9110%e9%80%b2%e6%95%b0%e3%81%8b%e3%82%892%e9%80%b2%e6%95%b0%e5%a4%89%e6%8f%9b%e3%81%ae%e3%82%a2%e3%83%ab%e3%82%b4%e3%83%aa%e3%82%ba%e3%83%a0%e5%9f%ba%e6%9c%ac","status":"publish","type":"post","link":"https:\/\/attacktube.com\/?p=2368","title":{"rendered":"\u3010C\u8a00\u8a9e\u301110\u9032\u6570\u304b\u30892\u9032\u6570\u5909\u63db\u306e\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0(\u57fa\u672c\u60c5\u5831\u6280\u8853\u8005\u8a66\u9a13 \u4ee4\u548c\u5143\u5e74\u5ea6 \u6625 \u5348\u524d \u554f1)"},"content":{"rendered":"\n<p>\u300c\u57fa\u672c\u60c5\u5831\u6280\u8853\u8005\u8a66\u9a13 \u4ee4\u548c\u5143\u5e74\u5ea6 \u6625 \u5348\u524d \u554f1\u300d\u306e10\u9032\u6570\u30922\u9032\u6570\u5909\u63db\u306e\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3092C\u8a00\u8a9e\u3067\u5b9f\u88c5\u3057\u305f\u3002\u6b21\u306e\u901a\u308a\u3067\u3042\u308b\u3002<br>10\u9032\u6570\u306e99\u306f2\u9032\u6570\u306e1100011\u306b\u306a\u308b\u3002<br><br>\u74b0\u5883<br>windows10(64bit)<br>Borland C++ 5.5.1 for Win32<br><br>binary(\u540d)2\u9032\u6570<br><br>\u6b21\u306e\u30b3\u30fc\u30c9\u3092Binary.c\u3068\u3059\u308b\u3002<\/p>\n\n\n\n<!--more-->\n\n\n\n<pre><code>\n#include &lt;stdio.h&gt;\n\nvoid decimalToBinary(int j) {\n\t\n\tint NISHIN[8]; \/\/10\u9032\u6574\u6570j(0&lt;j&lt;100)\u3092\u683c\u7d0d\u3059\u308b\u914d\u5217\n\tint k;\n\t\n\t\/\/ 10\u9032\u6570\u30922\u9032\u6570\u306b\u5909\u63db\n\tfor (k = 0; k &lt; 8; k++) {\n\t\tprintf(&quot;j = %d &quot;, j);\n\t\tNISHIN[k] = j % 2;\n\t\tprintf(&quot;NISHIN[%d] = %d\\n&quot;, k, NISHIN[k]);\n\t\tj = j \/ 2;\n\t}\n\t\n\tprintf(&quot;2\u9032\u6570: &quot;);\n\t\n\t\/\/ 2\u9032\u6570\u30928\u6841\u76ee\u304b\u3089\u9806\u306b\u51fa\u529b\u3059\u308b\u3002\n\tfor (k = 7; k &gt;= 0; k--) {\n\t\tprintf(&quot;%d&quot;, NISHIN[k]);\n\t}\n\t\n\tprintf(&quot;\\n&quot;);\n\t\n}\n\nint main() {\n    int decimal;\n\n    do {\n        printf(&quot;0\u3088\u308a\u5927\u304d\u304f100\u672a\u6e80\u306e10\u9032\u6570\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044: &quot;);\n        scanf(&quot;%d&quot;, &amp;decimal);\n\n        \/\/ \u7bc4\u56f2\u5916\u306e\u5834\u5408\u306f\u518d\u5165\u529b\u3092\u4fc3\u3059\n        if (decimal &lt;= 0 || decimal &gt;= 100) {\n            printf(&quot;\u5165\u529b\u304c\u7bc4\u56f2\u5916\u3067\u3059\u3002\\n&quot;);\n        }\n    } while (decimal &lt;= 0 || decimal &gt;= 100);\n\n    printf(&quot;\u5165\u529b\u3055\u308c\u305f\u6570\u5024: %d\\n&quot;, decimal);\n\t\n    decimalToBinary(decimal);\n\n    return 0;\n}\n<\/code><\/pre>\n\n\n\n<br>\n<script async=\"\" src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-3461056110605997\" crossorigin=\"anonymous\"><\/script>\n<ins class=\"adsbygoogle\" style=\"display:block; text-align:center;\" data-ad-layout=\"in-article\" data-ad-format=\"fluid\" data-ad-client=\"ca-pub-3461056110605997\" data-ad-slot=\"3137443461\"><\/ins>\n<script>\n     (adsbygoogle = window.adsbygoogle || []).push({});\n<\/script>\n<br>\n\n\n\n<p>\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3066\u5b9f\u884c\u3059\u308b\u3002<\/p>\n\n\n\n<pre><code>\nc:\\coco_c&gt;Binary.exe\n0\u3088\u308a\u5927\u304d\u304f100\u672a\u6e80\u306e10\u9032\u6570\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044: 200\n\u5165\u529b\u304c\u7bc4\u56f2\u5916\u3067\u3059\u3002\n0\u3088\u308a\u5927\u304d\u304f100\u672a\u6e80\u306e10\u9032\u6570\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044: 13\n\u5165\u529b\u3055\u308c\u305f\u6570\u5024: 13\nj = 13 NISHIN[0] = 1\nj = 6 NISHIN[1] = 0\nj = 3 NISHIN[2] = 1\nj = 1 NISHIN[3] = 1\nj = 0 NISHIN[4] = 0\nj = 0 NISHIN[5] = 0\nj = 0 NISHIN[6] = 0\nj = 0 NISHIN[7] = 0\n2\u9032\u6570: 00001101\nc:\\coco_c&gt;\n\n<\/code><\/pre>\n\n\n\n<p>10\u9032\u6570\u306e13\u304c2\u9032\u657000001101\u3068\u306a\u308b\u3002\u982d\u306e0\u304c\u4e0d\u8981\u3060\u3088\u306a\u3002\u3053\u306e0\u3092\u9664\u53bb\u3057\u305f\u3044\u3002<br>\u30b3\u30fc\u30c9\u3092\u6539\u9020\u3059\u308b\u3002<\/p>\n\n\n\n<pre><code>\n#include &lt;stdio.h&gt;\n\nvoid decimalToBinary(int j) {\n\t\n\tint NISHIN[8]; \/\/10\u9032\u6574\u6570j(0&lt;j&lt;100)\u3092\u683c\u7d0d\u3059\u308b\u914d\u5217\n\tint i,k=0;\n\t\n\t\/\/ 10\u9032\u6570\u30922\u9032\u6570\u306b\u5909\u63db\n\twhile (j &gt; 0) {\n\t\tprintf(&quot;j = %d &quot;, j);\n\t\tNISHIN[k] = j % 2;\n\t\tprintf(&quot;NISHIN[%d] = %d\\n&quot;, k, NISHIN[k]);\n\t\tj = j \/ 2;\n\t\tk += 1;\n\t}\n\t\n\tprintf(&quot;2\u9032\u6570: &quot;);\n\t\n\t\/\/ 2\u9032\u6570\u30928\u6841\u76ee\u304b\u3089\u9806\u306b\u51fa\u529b\u3059\u308b\u3002\n\tfor (i = k-1; i &gt;= 0; i-=1) {\n\t\tprintf(&quot;%d&quot;, NISHIN[i]);\n\t}\n\t\n\tprintf(&quot;\\n&quot;);\n\t\n}\n\nint main() {\n    int decimal;\n\n    do {\n        printf(&quot;0\u3088\u308a\u5927\u304d\u304f100\u672a\u6e80\u306e10\u9032\u6570\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044: &quot;);\n        scanf(&quot;%d&quot;, &amp;decimal);\n\n        \/\/ \u7bc4\u56f2\u5916\u306e\u5834\u5408\u306f\u518d\u5165\u529b\u3092\u4fc3\u3059\n        if (decimal &lt;= 0 || decimal &gt;= 100) {\n            printf(&quot;\u5165\u529b\u304c\u7bc4\u56f2\u5916\u3067\u3059\u3002\\n&quot;);\n        }\n    } while (decimal &lt;= 0 || decimal &gt;= 100);\n\n    printf(&quot;\u5165\u529b\u3055\u308c\u305f\u6570\u5024: %d\\n&quot;, decimal);\n\t\n    decimalToBinary(decimal);\n\n    return 0;\n}\n<\/code><\/pre>\n\n\n\n<p>\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3066\u5b9f\u884c\u3059\u308b\u3002<\/p>\n\n\n\n<pre><code>\nc:\\coco_c&gt;bcc32 Binary.c\nBorland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland\nBinary.c:\nTurbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland\n\nc:\\coco_c&gt;Binary.exe\n0\u3088\u308a\u5927\u304d\u304f100\u672a\u6e80\u306e10\u9032\u6570\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044: 200\n\u5165\u529b\u304c\u7bc4\u56f2\u5916\u3067\u3059\u3002\n0\u3088\u308a\u5927\u304d\u304f100\u672a\u6e80\u306e10\u9032\u6570\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044: 13\n\u5165\u529b\u3055\u308c\u305f\u6570\u5024: 13\nj = 13 NISHIN[0] = 1\nj = 6 NISHIN[1] = 0\nj = 3 NISHIN[2] = 1\nj = 1 NISHIN[3] = 1\n2\u9032\u6570: 1101\n\nc:\\coco_c&gt;\n<\/code><\/pre>\n\n\n\n<p>int\u578b\u3067\u5165\u529b\u53ef\u80fd\u306a\u6570\u5b57\u306e\u6700\u5927\u5024\u306f2147483647\u3067\u3042\u308b\u3002<br>2147483647\u304c\u5165\u529b\u3067\u304d\u308b\u3088\u3046\u306b\u30b3\u30fc\u30c9\u3092\u6539\u9020\u3059\u308b\u3002<\/p>\n\n\n\n<pre><code>\n#include &lt;stdio.h&gt;\n\nvoid decimalToBinary(int j) {\n\t\n\tint NISHIN[31]; \/\/10\u9032\u6574\u6570j(0&lt;j&lt;100)\u3092\u683c\u7d0d\u3059\u308b\u914d\u5217\n\tint i,k=0;\n\t\n\t\/\/ 10\u9032\u6570\u30922\u9032\u6570\u306b\u5909\u63db\n\twhile (j &gt; 0) {\n\t\tprintf(&quot;j = %d &quot;, j);\n\t\tNISHIN[k] = j % 2;\n\t\tprintf(&quot;NISHIN[%d] = %d\\n&quot;, k, NISHIN[k]);\n\t\tj = j \/ 2;\n\t\tk += 1;\n\t}\n\t\n\tprintf(&quot;2\u9032\u6570: &quot;);\n\t\n\t\/\/ 2\u9032\u6570\u30928\u6841\u76ee\u304b\u3089\u9806\u306b\u51fa\u529b\u3059\u308b\u3002\n\tfor (i = k-1; i &gt;= 0; i-=1) {\n\t\tprintf(&quot;%d&quot;, NISHIN[i]);\n\t}\n\t\n\tprintf(&quot;\\n&quot;);\n\t\n}\n\nint main() {\n    int decimal;\n\n\t\/\/printf(&quot;0\u3088\u308a\u5927\u304d\u304f4294967297\u4ee5\u4e0b\u306e10\u9032\u6570\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044: &quot;);\n        \/\/scanf(&quot;%d&quot;, &amp;decimal);\n\t\n\t\n    do {\n        printf(&quot;0\u3088\u308a\u5927\u304d\u304f4294967297\u4ee5\u4e0b\u306e10\u9032\u6570\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044: &quot;);\n        scanf(&quot;%d&quot;, &amp;decimal);\n\n        \/\/ \u7bc4\u56f2\u5916\u306e\u5834\u5408\u306f\u518d\u5165\u529b\u3092\u4fc3\u3059\n        if (decimal &lt;= 0 || decimal &gt; 2147483647) {\n            printf(&quot;\u5165\u529b\u304c\u7bc4\u56f2\u5916\u3067\u3059\u3002\\n&quot;);\n        }\n    } while (decimal &lt;= 0 || decimal &gt; 2147483647);\n\t\n\t\n\tprintf(&quot;\u5165\u529b\u3055\u308c\u305f\u6570\u5024: %d\\n&quot;, decimal);\n\t\n    decimalToBinary(decimal);\n\n    return 0;\n}\n<\/code><\/pre>\n\n\n\n<p>\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3066\u5b9f\u884c\u3059\u308b\u3002<br>\u30b3\u30f3\u30d1\u30a4\u30eb\u3059\u308b\u3068\u8b66\u544a\u304c\u51fa\u308b\u306e\u304c\u3088\u304f\u5206\u304b\u3089\u306a\u3044\u3002<br>\u63a8\u6e2c\u3060\u3051\u30694294967297\u304cint\u578b\u306e\u4e0a\u9650\u5024\u3060\u304b\u3089\u306a\u306e\u304b\uff1f<br>\u3046\u30fc\u3093\u3002\u3053\u306e\u8b66\u544a\u3092\u51fa\u3059\u306e\u304c\u30c0\u30e1\u3068\u304b\u8a00\u3046\u4eba\u3044\u308b\u3088\u306a\u3002<br>10\u9032\u6570\u306e4294967297\u30922\u9032\u6570\u306b\u3059\u308b\u30681111111111111111111111111111111\u306b\u306a\u308b\u3002<br>1111111111111111111111111111111\u306f31\u6841\u3042\u308b\u3002<\/p>\n\n\n\n<pre><code>\nc:\\coco_c&gt;bcc32 Binary.c\nBorland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland\nBinary.c:\n\u8b66\u544a W8008 Binary.c 51: \u6761\u4ef6\u304c\u5e38\u306b\u771f(\u95a2\u6570 main )\n\u8b66\u544a W8008 Binary.c 54: \u6761\u4ef6\u304c\u5e38\u306b\u771f(\u95a2\u6570 main )\nTurbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland\n\nc:\\coco_c&gt;Binary.exe\n0\u3088\u308a\u5927\u304d\u304f4294967297\u4ee5\u4e0b\u306e10\u9032\u6570\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044: 2147483647\n\u5165\u529b\u3055\u308c\u305f\u6570\u5024: 2147483647\nj = 2147483647 NISHIN[0] = 1\nj = 1073741823 NISHIN[1] = 1\nj = 536870911 NISHIN[2] = 1\nj = 268435455 NISHIN[3] = 1\nj = 134217727 NISHIN[4] = 1\nj = 67108863 NISHIN[5] = 1\nj = 33554431 NISHIN[6] = 1\nj = 16777215 NISHIN[7] = 1\nj = 8388607 NISHIN[8] = 1\nj = 4194303 NISHIN[9] = 1\nj = 2097151 NISHIN[10] = 1\nj = 1048575 NISHIN[11] = 1\nj = 524287 NISHIN[12] = 1\nj = 262143 NISHIN[13] = 1\nj = 131071 NISHIN[14] = 1\nj = 65535 NISHIN[15] = 1\nj = 32767 NISHIN[16] = 1\nj = 16383 NISHIN[17] = 1\nj = 8191 NISHIN[18] = 1\nj = 4095 NISHIN[19] = 1\nj = 2047 NISHIN[20] = 1\nj = 1023 NISHIN[21] = 1\nj = 511 NISHIN[22] = 1\nj = 255 NISHIN[23] = 1\nj = 127 NISHIN[24] = 1\nj = 63 NISHIN[25] = 1\nj = 31 NISHIN[26] = 1\nj = 15 NISHIN[27] = 1\nj = 7 NISHIN[28] = 1\nj = 3 NISHIN[29] = 1\nj = 1 NISHIN[30] = 1\n2\u9032\u6570: 1111111111111111111111111111111\n\nc:\\coco_c&gt;\n<\/code><\/pre>\n\n\n\n<p>2147483647\u306f\u5b9f\u306f\u7d20\u6570<br>2^31-1 = 2147483647<\/p>\n\n\n\n<script type=\"text\/javascript\">\njQuery(function($){\n$(\".jp-video\").hide();\n});\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>\u300c\u57fa\u672c\u60c5\u5831\u6280\u8853\u8005\u8a66\u9a13 \u4ee4\u548c\u5143\u5e74\u5ea6 \u6625 \u5348\u524d \u554f1\u300d\u306e10\u9032\u6570\u30922\u9032\u6570\u5909\u63db\u306e\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3092C\u8a00\u8a9e\u3067\u5b9f\u88c5\u3057\u305f\u3002\u6b21\u306e\u901a\u308a\u3067\u3042\u308b\u300210\u9032\u6570\u306e99\u306f2\u9032\u6570\u306e1100011\u306b\u306a\u308b\u3002 \u74b0\u5883windows10(64bit)Borland [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[10],"tags":[],"class_list":["post-2368","post","type-post","status-publish","format-standard","hentry","category-c"],"jetpack_featured_media_url":"","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/attacktube.com\/index.php?rest_route=\/wp\/v2\/posts\/2368","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/attacktube.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/attacktube.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/attacktube.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/attacktube.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2368"}],"version-history":[{"count":17,"href":"https:\/\/attacktube.com\/index.php?rest_route=\/wp\/v2\/posts\/2368\/revisions"}],"predecessor-version":[{"id":2404,"href":"https:\/\/attacktube.com\/index.php?rest_route=\/wp\/v2\/posts\/2368\/revisions\/2404"}],"wp:attachment":[{"href":"https:\/\/attacktube.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2368"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/attacktube.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2368"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/attacktube.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2368"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}