🌱Aadam's Garden

Search

Search IconIcon to open search

Bits

Last updated Jun 24, 2022

Links:: 2022 Introduction to Classical and Quantum Computing


In this chapter, we learn about the classical concepts shown in the table below:
thomas_wong_concepts_table.png

# Bits

# Coins

# Dice

# Encoding Information

# Physical Bits

# Binary

# ASCII

# Logic Gates

# Single-Bit Gates

# Two-Bit Gates

# Logic Gates as Physical Circuits

# Universal Gates

# Adders and Verilog

# Adding Binary Numbers by Hand

# Half Adder

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
module halfadd(C,S,A,B); 
	input A, B; 
	output C, S; 
	
	xor xor1(S,A,B); 
	and and1(C,A,B); 
endmodule 

module main; 
	reg A,B; 
	wire C,S; 
	
	halfadd half1(C,S,A,B); 
	
	initial begin 
		A=0; 
		B=1; 
		#5; // Wait 5 time units. 
		$display("Carry = ",C); 
		$display("Sum = ",S); 
	end 
endmodule

# Full Adder

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
module halfadd(C,S,A,B); 
	input A, B; 
	output C, S; 
	
	xor xor1(S,A,B); 
	and and1(C,A,B); 
endmodule 

module fulladd(Cout,S,A,B,Cin); 
	input A, B, Cin; 
	output Cout, S; 
	wire w1, w2, w3; 

	halfadd half1(w1,w2,A,B); 
	halfadd half2(w3,S,w2,Cin); 
	or or1(Cout,w1,w3); 
endmodule 

module main; 
	reg A,B,Cin; 
	wire Cout,S; 
	
	fulladd full1(Cout,S,A,B,Cin); 
	
	initial begin 
		A=0; 
		B=1; 
		Cin=1; 
		#5; // Wait 5 time units. 
		$display("Carry = ",Cout); 
		$display("Sum = ",S); 
	end
endmodule

# Ripple-Carry Adder

# Ripple-Carry with Full Adders

# Circuit Complexity

# Circuit Simplification and Boolean Algebra

# Order of Operations'

# Association, Commutivity, and Distribution

# Identities Involving Zero and One

# Single-Variable Identities

# Two-Variable Identities and De Morgan’s Laws

# Circuit Simplification

# Reversible Logic Gates

# Reversible Gates

# Irreversible Gates

# Toffoli Gate: A Reversible AND Gate

# Making Irreversible Gates Reversible

# Error Correction

# Errors in Physical Devices

# Error Detection

# Error Correction

# Computational Complexity

# Asymptotic Notation

# Complexity Classes

# Turing Machines

# Components

# Incrementing Binary Numbers

# Church-Turing Thesis

# Summary