{
    "componentChunkName": "component---src-templates-learn-js",
    "path": "/learn/ds/binary_divison",
    "result": {"data":{"mdx":{"frontmatter":{"title":"Binary Division","date":"September 30, 2022","tags":["ds"],"description":"Binary Division"},"body":"var _excluded = [\"components\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* @jsxRuntime classic */\n\n/* @jsx mdx */\nvar _frontmatter = {\n  \"title\": \"Binary Division\",\n  \"date\": \"2022-09-30\",\n  \"description\": \"Binary Division\",\n  \"tags\": [\"ds\"],\n  \"type\": \"tuts\"\n};\n\nvar makeShortcode = function makeShortcode(name) {\n  return function MDXDefaultShortcode(props) {\n    console.warn(\"Component \" + name + \" was not imported, exported, or provided by MDXProvider as global scope\");\n    return mdx(\"div\", props);\n  };\n};\n\nvar Callouts = makeShortcode(\"Callouts\");\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n      props = _objectWithoutProperties(_ref, _excluded);\n\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"h2\", null, \"Binary Division :\"), mdx(\"p\", null, \"process of diving two binary numbers.\"), mdx(\"h3\", null, \"Rules :\"), mdx(\"table\", {\n    className: \"table-space table-border\"\n  }, mdx(\"tbody\", null, mdx(\"tr\", null, mdx(\"th\", null, \"Dividend\"), mdx(\"th\", null), mdx(\"th\", null, \"Divisor\"), mdx(\"th\", null), mdx(\"th\", null, \"Result\")), mdx(\"tr\", null, mdx(\"td\", null, \"0\"), mdx(\"td\", null, \"/\"), mdx(\"td\", null, \"1\"), mdx(\"td\", null, \"=\"), mdx(\"td\", null, \"0\")), mdx(\"tr\", null, mdx(\"td\", null, \"1\"), mdx(\"td\", null, \"/\"), mdx(\"td\", null, \"1\"), mdx(\"td\", null, \"=\"), mdx(\"td\", null, \"1\")))), mdx(Callouts, {\n    name: \"danger\",\n    mdxType: \"Callouts\"\n  }, \"Diving 0 by something gives Error , not mentioned in Rules.\"), mdx(\"h4\", null, \"Note: Before learnig Binary division, please go through \", mdx(\"a\", {\n    parentName: \"h4\",\n    \"href\": \"/learn/ds/binary_substraction\"\n  }, \"Binary Substraction\")), mdx(\"h3\", null, \"Steps : 011010 / 0101 =?\"), mdx(Callouts, {\n    name: \"info\",\n    mdxType: \"Callouts\"\n  }, \"29 * 9 =? i.e., 11101 = 29 and 1001 = 9 \"), mdx(\"p\", null, \"1.Remove all the zeros from the most Significant Bit (MSB) or from left to rigt.\"), mdx(\"p\", null, \"Dividend = 11010\", mdx(\"sub\", null, \"2\"), \" , Divisor = 101\", mdx(\"sub\", null, \"2\")), mdx(\"p\", null, \"2.Since Divisor is smaller, it will be multiplied with 1 and result will be the substrahend. while substracting ,follow binary Substraction rules.\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-javascript\",\n    \"metastring\": \"file=index.js show=false diff\",\n    \"file\": \"index.js\",\n    \"show\": \"false\",\n    \"diff\": true\n  }, \"//Binary Divison of 11010 / 101\\n             \\u278A\\n      _____________\\n  101 ) 1  \\u03371\\u0337 0 1 0 ( 1\\n  -     1  0 1\\n      -------------\\n        0  0 1\\n\")), mdx(\"p\", null, \"3.As per rules of division, the next lease Significant Bit comes down and divisor is multiplied by 1,\\nsince the result 101 is bigger than the minuend 0011 , this step cannot be performed ,then we have to multiply by 0\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-javascript\",\n    \"metastring\": \"file=index.js show=false diff\",\n    \"file\": \"index.js\",\n    \"show\": \"false\",\n    \"diff\": true\n  }, \"//Binary Divison of 11010 / 101\\n             \\u278A\\n      _____________\\n  101 ) 1  \\u03371\\u0337 0 1 0 ( 1 0\\n  -     1  0 1\\n      -------------\\n        0  0 1 1\\n             0 0\\n      -------------\\n             1 1 0\\n\")), mdx(\"p\", null, \"4.write down 0 as next bit of quotient.\"), mdx(\"p\", null, \"5.Again divisor is multiplied by 1 .result is written as 101 \", \"*\", \" 1 = 101\"), mdx(\"p\", null, \"6.In final step, as per binary Substraction.we substract 101\", mdx(\"sub\", null, \"2\"), \" from 110\", mdx(\"sub\", null, \"2\"), \"\\n,we get 110-101 = 001\", mdx(\"sub\", null, \"2\")), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-javascript\",\n    \"metastring\": \"file=index.js show=false diff\",\n    \"file\": \"index.js\",\n    \"show\": \"false\",\n    \"diff\": true\n  }, \"//Binary Divison of 11010 / 101\\n             \\u278A\\n      _____________\\n  101 ) 1  \\u03371\\u0337 0 1 0 ( 1 0 1\\n  -     1  0 1\\n      -------------\\n        0  0 1 1\\n      -      0 0\\n      -------------\\n             1 1 0\\n      -      1 0 1\\n      -------------\\n                 1\\n\")), mdx(\"p\", null, \"Now Quotient = ( 101 )\", mdx(\"sub\", null, \"2\"), \" , Remainder = 001 = 1.\"), mdx(Callouts, {\n    name: \"success\",\n    mdxType: \"Callouts\"\n  }, \"Answer : 101\", mdx(\"sub\", null, \"2\"), \" = 5\", mdx(\"sub\", null, \"10\"), mdx(\"br\", null), \"11010\", mdx(\"sub\", null, \"2\"), \" = 25\", mdx(\"sub\", null, \"10\"), \" / 101\", mdx(\"sub\", null, \"2\"), \" = 5\", mdx(\"sub\", null, \"10\")));\n}\n;\nMDXContent.isMDXComponent = true;","slug":"ds/binary_divison"},"allMdx":{"edges":[{"node":{"slug":"ds/arrays","id":"8ab43cbe-bc50-5590-925e-1a45d7028386"}},{"node":{"slug":"ds/binary_addition","id":"26e70246-f787-5a17-baa8-9375bbacc879"}},{"node":{"slug":"ds/binary_divison","id":"ec6f892f-531e-5661-8a44-d08f906ecba5"}},{"node":{"slug":"ds/binary_operations","id":"b2e4a072-3108-546d-a06a-646e43d834cc"}},{"node":{"slug":"ds/binary_multiplication","id":"0b241fae-5107-5843-b21e-7a5ed393168f"}},{"node":{"slug":"ds/binary_substraction","id":"18f53266-039e-5e0c-af57-37c05a2e80ec"}},{"node":{"slug":"ds/linear_data_structures","id":"0d96c16b-7430-59aa-b81a-73e67dcfd3d2"}},{"node":{"slug":"ds/bit_manipulation","id":"03ba2551-8800-5f50-9724-3a84d09a5989"}},{"node":{"slug":"ds/intro","id":"67e2c78b-07c3-57cf-9984-08e405f77783"}},{"node":{"slug":"ds/roadmap","id":"f7856a33-93ca-5464-8e5a-d5dc41765650"}},{"node":{"slug":"ds/programming_language","id":"ac14fda6-ff3a-5306-964a-3ce25168a6f0"}},{"node":{"slug":"ds/number_systems","id":"12494952-aaee-5db2-91ef-4db461c5b95c"}},{"node":{"slug":"ds/time_space_complex","id":"b7695373-5e9c-56c5-9b7f-5a632785916f"}}]}},"pageContext":{"id":"ec6f892f-531e-5661-8a44-d08f906ecba5","filePath":"/ds/","previousPostId":"ds/number_systems","nextPostId":"ds/binary_multiplication"}},
    "staticQueryHashes": ["2033233798"]}