エントリーの編集
![loading...](https://b.st-hatena.com/bdefb8944296a0957e54cebcfefc25c4dcff9f5f/images/v4/public/common/loading@2x.gif)
エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
記事へのコメント0件
- 注目コメント
- 新着コメント
このエントリーにコメントしてみましょう。
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
![アプリのスクリーンショット](https://b.st-hatena.com/bdefb8944296a0957e54cebcfefc25c4dcff9f5f/images/v4/public/entry/app-screenshot.png)
- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
32ビット 2進数で表示
static void printB(int i) { String s = String.format("%32s", Integer.toBinaryString(i)).replaceAl... static void printB(int i) { String s = String.format("%32s", Integer.toBinaryString(i)).replaceAll(" ", "0"); System.out.println(s); //System.out.println(s.length()); } まず、toBinaryStringを使って基本変換。 次にformatterを使用して、桁そろえ。その際、空白でパディングされるので、空白を0になおしています。 Integer.MIN_VALUE で 10000000000000000000000000000000 Integer.MAX_VALUE で 01111111111111111111111111111111 0xff 0xffff 0xffffff 0xffffffff は 0000000000