<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>tokitashi</author_name>
  <author_url>https://blog.hatena.ne.jp/tokitashi/</author_url>
  <blog_title>kshun技術のーと</blog_title>
  <blog_url>https://tokitashi.hatenablog.com/</blog_url>
  <categories>
    <anon>CS学習</anon>
  </categories>
  <description>やりたかったこと・やったこと ・文字列の数値同士で引き算がしたかった ・文字列→数値型に変換して引き算を行った 1の補数を取得するプログラム*1 function oneComplement(bits){ let n = bits.length; let oneComplement = &quot;&quot;; for(let i=0; i &lt; n; i++) { oneComplement+=&quot;1&quot;; } console.log(oneComplement); let one = String(Number(oneComplement) - bits); console.log(one); return on…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftokitashi.hatenablog.com%2Fentry%2F2023%2F08%2F25%2F083051&quot; title=&quot;文字列と数値の演算が異なる理由 - kshun技術のーと&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2023-08-25 08:30:51</published>
  <title>文字列と数値の演算が異なる理由</title>
  <type>rich</type>
  <url>https://tokitashi.hatenablog.com/entry/2023/08/25/083051</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
