John Mavrick's Garden

Search IconIcon to open search

Last updated April 10, 2022

Status: Tags: #archivedCards/macm101/numbertheory #aCards/cmpt295/binary Links: Nand2Tetris MOC


Binary

Principles

Using 0’s and 1’s to represent digits

General Form

? Image from Gyazo

Find binary expansion of 165 ? Image from Gyazo

Image from Gyazo

Examples

Int in C

Decimal Binary
-2147483648 10000000 00000000 00000000 00000000
-2147483647 10000000 00000000 00000000 00000001 ___

Converting

Steps to convert negative number to binary ?

Steps to convert signed to unsigned ?

Steps to convert unsigned to signed ?

Exercises

  1. Convert 10011011 from binary to decimal.
  2. Convert 29 from decimal to binary.
  3. Write a program that get an integer in decimal and print its binary form.

Backlinks

1
list from Binary AND !outgoing(Binary)

References:


Interactive Graph