Good Earth School Naduveerapattu Date: Marks: 70
|
|
- Cornelius Charles
- 6 years ago
- Views:
Transcription
1 Good Earth School Naduveerapattu Date: Marks: 70 Class: XI Second Term Examination Computer Science Answer Key Time: 3 hrs. Candidates are allowed additional 5 minutes for only reading the paper. They must NOT start writing during this time. All working, including rough work should be done on the same sheet as the rest of the answer. The intended marks for questions or parts of questions are given in brackets ( ). Part I Answer all the questions Question. [5] a) Using truth table, verify the following expression: X + ( Y + Z ) = ( X + Y ) + Z Also state the law. X Y Z Y+Z X+(Y+Z) X+Y (X+Y)+Z Associative Law b) Given, F(X, Y, Z)= (X + Y ). (Y + Z ) write the function in canonical product of sum form. = (X + Y + 0). (Y + Z + 0) = (X +Y +(Z.Z ).( Y + Z +(X.X ) =(X +Y +Z).(X +Y +Z ).(Y+Z +X).(Y+Z +X ) c) Draw the truth table and logic circuit for a 2 input XNOR gate. A B X X = AB+A B A B 0 0 or A A B B d) Find the complement of the following expression: =X.(X +Y) e) If (X Y) then write its: i) Converse Y X ii) Contra positive ~Y ~X
2 Question 2. [0] a) A square matrix M[][] of size 0 is stored in the memory with each element requiring 4 bytes of storage. If the base address at M[0][0] is 840, determine the address at M[4][8] when the matrix is stored in row major wise. Row Major address formula : M[i][j] = B + W [(i lr) * column + (j lc)] B = 840, lr = 0, lc = 0, W = 4, rows = 0, column = 0, i = 4, j = 8 M[4][8] = [ ( 4-0 ) x 0 + ( 8 0 ) ] = = 2032 b) Name the file stream classes to : i) Write data to a file in binary form. FileOutputStream / DataOutputStream/ FileWriter/ OutputStream ii) Read data from a file in text form. FileReader / DataInputStream/ InputStream/ FileInputStream c) What is a constructor? State one difference between a constructor and member function of a class. A constructor is a member function which has the same name as its class and it gets invoked every time a new object is created, it is used to construct memory and initialize object values. Constructor Member function of a class Constructor do not return a value not even void Member function of a class should return a value or declared as void Invoked automatically Has to be called Same name as that of a class Has a different name d) State the use of exception handling. Name the two types of exceptions. Exception handling is a transparent and neat way for handling program errors Types of exceptions checked and unchecked exceptions. e) Manipulate the following binary numbers i. (000) 2 + (000) (000) 2 + (000) 2 = (0) 2 ii. (0000) 2 - (00) s complement of Now add to
3 2s complement 000 (0000) 2 - (00) 2 = (0) 2 iii. (.) 2 = (7.75) 0 iv. ( ) 2 = (622) 8 Question 3. [5] a) The following function is a part of some class which computes and sorts an array arr[] in ascending order using the bubble sort technique. There are some places in the code marked by??,?2?,?3?,?4?,?5?, which must be replaced by a statement /an expression so that the function works properly: class Trial void bubblesort(int arr[]) inti,j,k,tmp; for(i=0;??;i++) for(j=0;?2?;j++) if(arr[j]>?3?) tmp=arr[j];?4?=arr[j+]; arr[j+]=?5?; i) What is the expression or statement at?? i<arr.length- or i<size- or i <k- (where k = arr.length) ii) What is the expression or statement at?2? j<arr.length- or j<arr.length--i or j < k- iii) What is the expression or statement at?3? arr[j+] iv) What is the expression or statement at?4? arr[j] v) What is the expression or statement at?5? tmp Part II Answer seven questions in this part, choosing two questions from Section A, two from Section B and two from Section C. Question 4 Section A Answer any two questions a) Given the Boolean function F(A,B,C,D)= Σ(4,6,7,0,,2,4,5)
4 i) Reduce the above expression by using 4 variable K- map, showing the various groups ( i.e. octets, quads and pairs). ii) Draw the logic gate diagram of the reduced expression. Assume that the variables and their complements are available as inputs. [4 + = 5] CD AB C D C D CD CD A B A B AB AB 8 9 Quad :BD Quad 2 :BC Quad 3 :AC The reduced Expression is => BD +BC+AC A B C D 0 BD BC AC b) Given the Boolean function F(P,Q,R,S)= Π(0,5,7,8,0,2,3,4,5) i) Reduce the above expression by using 4 variable K- map, showing the various groups ( i.e. octets, quads and pairs). ii) Draw the logic gate diagram of the reduced expression. Assume that the variables and their complements are available as inputs. [4 + = 5] R+S P+Q R+S R+S R +S R +S P+Q P+Q P +Q P +Q
5 Pair : Q+R+S Pair 2 : P +R +S Quad : Q +S Quad 2 : P +Q P Q R S Q+R+S P +R +S Q +S P +Q Question 5. The principal of a school intends to select students for admission to Class XI on the following criteria: Student is of the same school and has passed the Class X Board Examination with more than 60% marks. OR Student is of the same school, has passed the Class X Board Examination with less than 60% marks but has taken active part in co-curricular activities. OR Student is not from the same school but has either passed the Class X board Examination with more than 60% marks or has participated in Sports at the national level. The inputs are : INPUTS S - Student is of the same school P - Has passed the Class X Board Examination with more than 60% marks. C - Has taken active part in co-curricular activities. T - Has participated in sports at the National Level. OUTPUT:- X Denotes admission status [ indicates granted and 0 indicates refused in all the cases.] a) Draw the truth table for the inputs and outputs given above and write the SOP expression. [3] b) Reduce X(S,P,C,T) using Karnaugh s map. [5] Draw the logic gate diagram for the reduced SOP expression for X(S,P,C,T) using AND and OR gate. You may use gates with two or more inputs. Assume that the variable and their complements are available as inputs. [2] S P C T X S P C T S P CT S PC T
6 0 0 S PC T 0 0 S PCT 0 S PCT SP CT 0 SP CT 0 0 SPC T 0 SPC T 0 SPCT SPCT X(S,P,C,T) = S P C T + S P CT + S PC T + S PC T + S PCT + S PCT + SP CT + SP CT+ SPC T + SPC T + SPCT + SPCT CT SP C T C T CT CT S P S P SP SP Quad : S T Quad 2 : SC Octet : P X(S,P,C,T) = S T+SC+P S P C T Question 6 a) Verify algebraically if, Taking LHS ( ) ( ) ( ) ( ) ( ) ( ) Z+Z = [2] ( ) ( ) ( ) X +Y => RHS b) Represent the Boolean expression X + YZ with the help of NOR gates only. [2]
7 X Y Z c) Define the terms contingency, contradiction and tautology. [3] Contingency: The propositions that have some combination of s and 0s in their truth table output column. Contradictions : The propositions that have all 0s in their truth table output column Tautology : The propositions that have all s in their truth table in output column [3] d) Consider the following truth table where A and B are two inputs and X is the output: A B X i) Name and draw the logic gate for the given truth table. A B ii) Write the POS of X(A,B) X(A,B) = (A+B)(A +B ) [2] [] SECTION B Answer any two Question 7 Design a class VowelWord to accept a sentence and calculate the frequency of words that begin with a vowel. The words in the input string are separated by a single blank space and terminated by a full stop. The description of the class is given below: Class Name : VowelWord Data members str : to store a sentence freq : to store the frequency of words beginning with a vowel. Member functions VowelWord() : constructor to initialize data members to legal initial values. void readstr() : to accept a sentence. void freq_vowel( ) : counts the frequency of the words beginning with a vowel.
8 void display() : to display the original string and the frequency of the words that begin with a vowel. Specify the class VowelWord giving details of the constructor( ), void readstr(), void freq_vowel() and void display(). Also define the main function to create an object and call the methods accordingly to enable the task. [0] import java.io.*; public class VowelWord String str ; int freq; VowelWord() //: constructor to initialize data members to legal initial values. str = ""; freq = 0; void readstr() throws IOException //: to accept a sentence. BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); System.out.println("Enter a sentence:"); str = br.readline(); void freq_vowel( ) // : counts the frequency of the words beginning with a vowel. if ("aeiouaeiou".indexof(str.charat(0)) >=0) freq++; for(int i=; i<str.length(); i++) if ((str.charat(i) == ' ') &&("aeiouaeiou".indexof(str.charat(i+)) >=0)) freq++; void display() System.out.println("the original String is : "+ str); System.out.println("the number of words that start with a vowel is : "+freq); public static void main(string args[])throws IOException VowelWord v = new VowelWord(); v.readstr(); v.freq_vowel(); v.display();
9 Question 8. A class Collection contains an array of 00 integers. Using the following class description create an array with common elements from two integer arrays. Some of the members of the class are given below: Class name : Collection Data members arr[] : integer array len : length of the array Member functions Collection() : default constructor Collection(int) : parameterized constructor to assign the length of thearray. voidinparr() : to accept the array elements. Collection common(collection) : returns a Collection containing the common elements of current Collection object and the Collection object passed as a parameter. void arrange() : sort the array elements of the object containing common elements in ascending order using any sorting technique. void display() : displays the array elements. Specify the class Collection giving the details of the constructors, void inparr() and void arrange(). Collection common(collection). You need not write the main Function. [0] import java.io.*; public class Collection int arr[]; int len; Collection() len =0; //: default constructor Collection(int len) thearray. this.len = len; arr = new int[len]; // : parameterized constructor to assign the length of void inparr()throws IOException //: to accept the array elements. BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); System.out.println("Enter the values of the array"); for(int i = 0; i <len; i++) arr[i] = Integer.parseInt(br.readLine());
10 Collection common(collection c) //: returns a Collection containing the common elements //of current Collection object and the Collection object // passed as a parameter. int a = c.arr.length; int b = this.arr.length; int k = Math.max(a,b); int l=0; Collection result = new Collection(Math.min(a,b)); for(int i=0; i<k; i++) for(int j=0; j<k; j++) try if(c.arr[i] == this.arr[j]) result.arr[l++]= c.arr[i]; catch (Exception e) ; return result; void arrange() //: sort the array elements of the object containing //common elements in ascending order using any sorting technique. for(int i = 0; i<arr.length; i++) for(int j = 0; j<arr.length--i; j++) try if (arr[j] > arr[j+]) int t = arr[j]; arr[j] = arr[j+]; arr[j+] = t; catch(exception e) ;
11 Question 9. A happy number is a number in which the eventual sum of the square of the digits of the number is equal to Example : 28 = (2) 2 + ( 8 ) 2 = = = (6) 2 + ( 8) 2 = = = ( ) 2 + ( 0 ) 2 + ( 0 ) 2 = = Hence 28 is a happy number. Example : 2 = () 2 + (2) 2 = + 4 = 5 Hence 2 is not a happy number. Design a class Happy to check if a given number is a happy number. Some of the members of the class are given below: Class Name : Happy Data Members n : stores the number Member functions: Happy( ) : constructor to assign 0 to n void getnum(intnn) : to assign the parameter value to the number n = nn int sum_sq_digits(int x) : returns the sum of the square of the digits of the number x. void ishappy() : checks if the given number is a happy number by calling the function sum_sq_digits(int) and displays an appropriate message. Specify the class Happy giving details of the constructor( ), void getnum( int), intsum_sq_digits(int) and void ishappy(). Also define a main function to create an object and call the methods to check for a happy number. [0] import java.io.*; public class Happy int n; Happy() n = 0; void getnum( int nn) n = nn; int sum_sq_digits(int x) int sum =0; while(x!= 0) int d = x%0; sum += d*d;
12 x/=0; return sum; void ishappy() int t = n; int sum =0; do sum = sum_sq_digits(t); if (sum > 9) t = sum; else break; while (true); if(sum == ) System.out.println(n +" is a happy number"); else System.out.println(n+" is not a happy number"); public static void main(string args[])throws IOException BufferedReader br =new BufferedReader(new InputStreamReader(System.in)); Happy h= new Happy(); System.out.println("Enter a number "); int n = Integer.parseInt(br.readLine()); h.getnum(n); h.ishappy(); SECTION C Answer any two Question 0. Write a Java program to create a Text file in output mode and store 0 students 5 subject marks, with total and average. [5] import java.io.*; public class TextFile public static void main(string args[])throws IOException BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String file = "Textfile.txt";
13 FileWriter fw = new FileWriter(file); BufferedWriter bw = new BufferedWriter(fw); PrintWriter pw = new PrintWriter(bw); for(int i = 0; i< 2; i++) int m[] = new int[5]; System.out.println("Enter your name"); String name = br.readline(); pw.println(name); int total=0; System.out.println("Enter the 5 subject marks"); for(int j = 0; j< 5; j++) m[j] = Integer.parseInt(br.readLine()); pw.println(m[j]); total += m[j]; int avg = total / 5; pw.println(total); pw.println(avg); pw.close(); bw.close(); fw.close(); Question. Write a program to open an existing Binary file and read the String Name, int age, and String Address. Display the same on the screen as follows. [5] Name : XXXXXXXXXXXXXXXXX Age : XX Address : XXXXXXXXXXXXXXXXX import java.io.*; public class BinaryFile public static void main(string args[])throws IOException File fl=new File("sample.dat"); FileInputStream fout=new FileInputStream(fl); DataInputStream dout=new DataInputStream(fout); boolean check=false; while(!check) try String name=dout.readutf(); int age= dout.readint(); String address=dout.readline(); System.out.println("Name : " + name); System.out.println("Age : " + age); System.out.println("Address : "+ address); catch(eofexception e)
14 check = true; dout.close( ); fout.close( ); Question 2.. What are two types of stream classes we have in JAVA? Name them. [2] The two types of Stream classes are Byte Stream and Character Stream 2. Write the steps to input from a text file. [3]. Create a FileReader object 2. Link the above object to the BufferedReader object 3. Now read the content of the text file using readline(). 4. Read the file till the end of the file. 5. Close all the object. ********
Computer Science Paper 1 (Theory) Part I While working questions in this part, indicate briefly your working and reasoning wherever required.
Computer Science Paper 1 (Theory) Part I While working questions in this part, indicate briefly your working and reasoning wherever required. Question 1. a) Using truth table, verify the following expression:
More informationCOMPUTER SCIENCE. Paper-1 (THEORY) Three /tollrs
COMPUTER SCIENCE Paper-1 (THEORY) Three /tollrs (Candidates are allowed additional 15 minutes/or only reading the paper. They must NOT start writing during this time.) Answer all questions in Part 1 (compulsory)
More informationCOMPUTER SCIENCE Paper 1
COMPUTER SCIENCE Paper 1 (THEORY) (Three hours) Maximum Marks: 70 (Candidates are allowed additional 15 minutes for only reading the paper. They must NOT start writing during this time) -----------------------------------------------------------------------------------------------------------------------
More informationISC 2009 COMPUTER SCIENCE PAPER 1 THEORY PART I Answer all questions in this part
ISC 2009 COMPUTER SCIENCE PAPER 1 THEORY PART I Answer all questions in this part Question 1. a) Obtain the truth table to verify the following expression: X(Y+Z) = XY + XZ. Also name the law stated above.
More informationISC 2008 COMPUTER SCIENCE PAPER 1 THEORY PART I Answer all questions in this part Question 1. a) State the two complement properties of Boolean Algebra. Verify any one of them using the truth table. b)
More informationCOMPUTER SCIENCE PAPER 1
COMPUTER SCIENCE PAPER 1 (THEORY) (Maximum Marks: 70) (Time allowed: Three hours) (Candidates are allowed additional 15 minutes for only reading the paper. They must NOT start writing during this time.)
More informationPART I. Answer all questions in this Part. While answering questions in this Part, indicate briefly your working and reasoning, wherever required.
COMPUTER SCIENCE 2008 Paper-1 (THEORY) Three hours (Candidates are allowed additional 15 minutes for only reading the paper. They must NOT start writing during this time) Answer all question in Part I
More informationCOMPUTER SCIENCE. Paper 1
COMPUTER SCIENCE Paper 1 (THEORY) Three hours (Candidates are allowed additional 15 minutes for only reading the paper. They must NOT start writing during this time) ----------------------------------------------------------------------------------------------------------------------------------
More informationBOOLEAN ALGEBRA. 1. State & Verify Laws by using :
BOOLEAN ALGEBRA. State & Verify Laws by using :. State and algebraically verify Absorption Laws. (2) Absorption law states that (i) X + XY = X and (ii) X(X + Y) = X (i) X + XY = X LHS = X + XY = X( + Y)
More informationDarshan Institute of Engineering & Technology for Diploma Studies
Streams A stream is a sequence of data. In Java a stream is composed of bytes. In java, 3 streams are created for us automatically. 1. System.out : standard output stream 2. System.in : standard input
More informationSolved PAPER Computer Science-XII. Part -I. Answer all questions
ISC Solved PAPER 2017 Computer Science-XII Fully Solved (Question-Answer) Time : 3 hrs Max. Marks : 100 General Instructions 1. Answer all questions in Part I (compulsory) and seven questions from Part
More informationISC 2010 COMPUTER SCIENCE PAPER 1 THEORY
ISC 2010 COMPUTER SCIENCE PAPER 1 THEORY Question 1. a) If X=A BC + AB C + ABC + A BC then find the value of X when A=1; B=0; C=1 b) Verify if, P.(~P+Q )=(P Q) using truth table. c) Draw the logic circuit
More informationISC 2006 COMPUTER SCIENCE PAPER 1 THEORY PART I Answer all questions in this part
ISC 2006 COMPUTER SCIENCE PAPER 1 THEORY PART I Answer all questions in this part Question 1. a) State the two Absorption Laws of Boolean Algebra. Verify any one of them using the truth table. b) Find
More informationISC SPECIMEN PAPER Computer Science Paper 1 (Theory) Part I Question 1. [ 2 x 5 = 10] Question 2. [ 2 x 5 = 10] Question 3.
ISC SPECIMEN PAPER Computer Science Paper 1 (Theory) Part I While working questions in this part, indicate briefly your working and reasoning wherever required. Question 1. a) State the two distributive
More informationISC 2011 COMPUTER SCIENCE PAPER 1 THEORY
ISC 2011 COMPUTER SCIENCE PAPER 1 THEORY Question 1. a) State the two absorption laws. Verify any one of them using truth table. b) Reduce the following expression : F(A,B,C)= (0,1,2,3,4,5,6,7) Also find
More informationUNIT-4 BOOLEAN LOGIC. NOT Operator Operates on single variable. It gives the complement value of variable.
UNIT-4 BOOLEAN LOGIC Boolean algebra is an algebra that deals with Boolean values((true and FALSE). Everyday we have to make logic decisions: Should I carry the book or not?, Should I watch TV or not?
More informationISC 2007 COMPUTER SCIENCE PAPER 1 THEORY PART I Answer all questions in this part
ISC 2007 COMPUTER SCIENCE PAPER 1 THEORY PART I Answer all questions in this part Question 1. a) Simplify the following Boolean expression using laws of Boolean Algebra. At each step state clearly the
More informationByte and Character Streams. Reading and Writing Console input and output
Byte and Character Streams Reading and Writing Console input and output 1 I/O basics The io package supports Java s basic I/O (input/output) Java does provide strong, flexible support for I/O as it relates
More informationX Y Z F=X+Y+Z
This circuit is used to obtain the compliment of a value. If X = 0, then X = 1. The truth table for NOT gate is : X X 0 1 1 0 2. OR gate : The OR gate has two or more input signals but only one output
More information2.6 BOOLEAN FUNCTIONS
2.6 BOOLEAN FUNCTIONS Binary variables have two values, either 0 or 1. A Boolean function is an expression formed with binary variables, the two binary operators AND and OR, one unary operator NOT, parentheses
More informationChapter 3 Simplification of Boolean functions
3.1 Introduction Chapter 3 Simplification of Boolean functions In this chapter, we are going to discuss several methods for simplifying the Boolean function. What is the need for simplifying the Boolean
More informationExperiment 3: Logic Simplification
Module: Logic Design Name:... University no:.. Group no:. Lab Partner Name: Mr. Mohamed El-Saied Experiment : Logic Simplification Objective: How to implement and verify the operation of the logical functions
More informationCOMPUTER SCIENCE PAPER 1 THEORY YEAR 2008
COMPUTER SCIENCE PAPER 1 THEORY YEAR 2008 PART I Answer all questions in this part Question 1. a) State the two complement properties of Boolean Algebra. Verify any one of them using the truth table. b)
More informationUnit-IV Boolean Algebra
Unit-IV Boolean Algebra Boolean Algebra Chapter: 08 Truth table: Truth table is a table, which represents all the possible values of logical variables/statements along with all the possible results of
More informationAssignment2013 Please use this document only for verifying if your programs are right. Do not blindly copy paste and waste your time.
Please use this document only for verifying if your programs are right. Do not blindly copy paste and waste your time. 11/3/2013 TechSparx Computer Training Center Saravanan.G Please use this document
More informationChapter 10 Input Output Streams
Chapter 10 Input Output Streams ICT Academy of Tamil Nadu ELCOT Complex, 2-7 Developed Plots, Industrial Estate, Perungudi, Chennai 600 096. Website : www.ictact.in, Email : contact@ictact.in, Phone :
More informationFile Operations in Java. File handling in java enables to read data from and write data to files
Description Java Basics File Operations in Java File handling in java enables to read data from and write data to files along with other file manipulation tasks. File operations are present in java.io
More informationAgenda & Reading. Python Vs Java. COMPSCI 230 S Software Construction
COMPSCI 230 S2 2016 Software Construction File Input/Output 2 Agenda & Reading Agenda: Introduction Byte Streams FileInputStream & FileOutputStream BufferedInputStream & BufferedOutputStream Character
More informationJava Programs. System.out.println("Dollar to rupee converion,enter dollar:");
Java Programs 1.)Write a program to convert rupees to dollar. 60 rupees=1 dollar. class Demo public static void main(string[] args) System.out.println("Dollar to rupee converion,enter dollar:"); int rs
More informationGate Level Minimization Map Method
Gate Level Minimization Map Method Complexity of hardware implementation is directly related to the complexity of the algebraic expression Truth table representation of a function is unique Algebraically
More informationGate-Level Minimization
MEC520 디지털공학 Gate-Level Minimization Jee-Hwan Ryu School of Mechanical Engineering Gate-Level Minimization-The Map Method Truth table is unique Many different algebraic expression Boolean expressions may
More informationWeek 12. Streams and File I/O. Overview of Streams and File I/O Text File I/O
Week 12 Streams and File I/O Overview of Streams and File I/O Text File I/O 1 I/O Overview I/O = Input/Output In this context it is input to and output from programs Input can be from keyboard or a file
More informationToday. Book-keeping. File I/O. Subscribe to sipb-iap-java-students. Inner classes. Debugging tools
Today Book-keeping File I/O Subscribe to sipb-iap-java-students Inner classes http://sipb.mit.edu/iap/java/ Debugging tools Problem set 1 questions? Problem set 2 released tomorrow 1 2 So far... Reading
More informationSimplification of Boolean Functions
Simplification of Boolean Functions Contents: Why simplification? The Map Method Two, Three, Four and Five variable Maps. Simplification of two, three, four and five variable Boolean function by Map method.
More informationComputer Science. Unit-4: Introduction to Boolean Algebra
Unit-4: Introduction to Boolean Algebra Learning Objective At the end of the chapter students will: Learn Fundamental concepts and basic laws of Boolean algebra. Learn about Boolean expression and will
More informationAssignment (3-6) Boolean Algebra and Logic Simplification - General Questions
Assignment (3-6) Boolean Algebra and Logic Simplification - General Questions 1. Convert the following SOP expression to an equivalent POS expression. 2. Determine the values of A, B, C, and D that make
More informationCSC 1214: Object-Oriented Programming
CSC 1214: Object-Oriented Programming J. Kizito Makerere University e-mail: www: materials: e-learning environment: office: alt. office: jkizito@cis.mak.ac.ug http://serval.ug/~jona http://serval.ug/~jona/materials/csc1214
More informationChapter 2 Boolean algebra and Logic Gates
Chapter 2 Boolean algebra and Logic Gates 2. Introduction In working with logic relations in digital form, we need a set of rules for symbolic manipulation which will enable us to simplify complex expressions
More informationChapter 3. Gate-Level Minimization. Outlines
Chapter 3 Gate-Level Minimization Introduction The Map Method Four-Variable Map Five-Variable Map Outlines Product of Sums Simplification Don t-care Conditions NAND and NOR Implementation Other Two-Level
More informationPhiladelphia University Faculty of Information Technology Department of Computer Science. Computer Logic Design. By Dareen Hamoudeh.
Philadelphia University Faculty of Information Technology Department of Computer Science Computer Logic Design By Dareen Hamoudeh Dareen Hamoudeh 1 Canonical Forms (Standard Forms of Expression) Minterms
More informationCombinational Logic Circuits
Chapter 3 Combinational Logic Circuits 12 Hours 24 Marks 3.1 Standard representation for logical functions Boolean expressions / logic expressions / logical functions are expressed in terms of logical
More informationChapter 2 Combinational Logic Circuits
Logic and Computer Design Fundamentals Chapter 2 Combinational Logic Circuits Part 2 Circuit Optimization Overview Part Gate Circuits and Boolean Equations Binary Logic and Gates Boolean Algebra Standard
More informationFile IO. Computer Science and Engineering College of Engineering The Ohio State University. Lecture 20
File IO Computer Science and Engineering College of Engineering The Ohio State University Lecture 20 I/O Package Overview Package java.io Core concept: streams Ordered sequences of data that have a source
More informationIT101. File Input and Output
IT101 File Input and Output IO Streams A stream is a communication channel that a program has with the outside world. It is used to transfer data items in succession. An Input/Output (I/O) Stream represents
More informationSoftware Practice 1 - File I/O
Software Practice 1 - File I/O Stream I/O Buffered I/O File I/O with exceptions CSV format Practice#6 Prof. Joonwon Lee T.A. Jaehyun Song Jongseok Kim (42) T.A. Sujin Oh Junseong Lee 1 (43) / 38 2 / 38
More informationCS 251 Intermediate Programming Java I/O Streams
CS 251 Intermediate Programming Java I/O Streams Brooke Chenoweth University of New Mexico Spring 2018 Basic Input/Output I/O Streams mostly in java.io package File I/O mostly in java.nio.file package
More informationQUESTION BANK FOR TEST
CSCI 2121 Computer Organization and Assembly Language PRACTICE QUESTION BANK FOR TEST 1 Note: This represents a sample set. Please study all the topics from the lecture notes. Question 1. Multiple Choice
More informationDigital Logic Lecture 7 Gate Level Minimization
Digital Logic Lecture 7 Gate Level Minimization By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department Outline Introduction. K-map principles. Simplification using K-maps. Don t-care
More informationModule -7. Karnaugh Maps
1 Module -7 Karnaugh Maps 1. Introduction 2. Canonical and Standard forms 2.1 Minterms 2.2 Maxterms 2.3 Canonical Sum of Product or Sum-of-Minterms (SOM) 2.4 Canonical product of sum or Product-of-Maxterms(POM)
More informationWOSO Source Code (Java)
WOSO 2017 - Source Code (Java) Q 1 - Which of the following is false about String? A. String is immutable. B. String can be created using new operator. C. String is a primary data type. D. None of the
More informationCHAPTER-2 STRUCTURE OF BOOLEAN FUNCTION USING GATES, K-Map and Quine-McCluskey
CHAPTER-2 STRUCTURE OF BOOLEAN FUNCTION USING GATES, K-Map and Quine-McCluskey 2. Introduction Logic gates are connected together to produce a specified output for certain specified combinations of input
More informationSpecial error return Constructors do not have a return value What if method uses the full range of the return type?
23 Error Handling Exit program (System.exit()) usually a bad idea Output an error message does not help to recover from the error Special error return Constructors do not have a return value What if method
More informationFiles and IO, Streams. JAVA Standard Edition
Files and IO, Streams JAVA Standard Edition Java - Files and I/O The java.io package contains nearly every class you might ever need to perform input and output (I/O) in Java. All these streams represent
More informationA B AB CD Objectives:
Objectives:. Four variables maps. 2. Simplification using prime implicants. 3. "on t care" conditions. 4. Summary.. Four variables Karnaugh maps Minterms A A m m m3 m2 A B C m4 C A B C m2 m8 C C m5 C m3
More informationDKT 122/3 DIGITAL SYSTEM 1
Company LOGO DKT 122/3 DIGITAL SYSTEM 1 BOOLEAN ALGEBRA (PART 2) Boolean Algebra Contents Boolean Operations & Expression Laws & Rules of Boolean algebra DeMorgan s Theorems Boolean analysis of logic circuits
More informationcopy.dept_change( CSE ); // Original Objects also changed
UNIT - III Topics Covered The Object class Reflection Interfaces Object cloning Inner classes Proxies I/O Streams Graphics programming Frame Components Working with 2D shapes. Object Clone Object Cloning
More informationISC 2016 COMPUTER SCIENCE (THEORY) Md. Zeeshan Akhtar
ISC 206 COMPUTER SCIENCE (THEORY) Md. Zeeshan Akhtar COMPUTER SCIENCE PART I (20 Marks) Answer all questions. While answering questions in this Part, indicate briefly your working and reasoning, wherever
More informationLecture 11.1 I/O Streams
21/04/2014 Ebtsam AbdelHakam 1 OBJECT ORIENTED PROGRAMMING Lecture 11.1 I/O Streams 21/04/2014 Ebtsam AbdelHakam 2 Outline I/O Basics Streams Reading characters and string 21/04/2014 Ebtsam AbdelHakam
More informationRecursion. General Algorithm for Recursion. When to use and not use Recursion. Recursion Removal. Examples
Recursion General Algorithm for Recursion When to use and not use Recursion Recursion Removal Examples Comparison of the Iterative and Recursive Solutions Exercises Unit 19 1 General Algorithm for Recursion
More informationLSN 4 Boolean Algebra & Logic Simplification. ECT 224 Digital Computer Fundamentals. Department of Engineering Technology
LSN 4 Boolean Algebra & Logic Simplification Department of Engineering Technology LSN 4 Key Terms Variable: a symbol used to represent a logic quantity Compliment: the inverse of a variable Literal: a
More informationCPSC 319. Week 2 Java Basics. Xiaoyang Liu & Sorting Algorithms
CPSC 319 Week 2 Java Basics Xiaoyang Liu xiaoyali@ucalgary.ca & Sorting Algorithms Java Basics Variable Declarations Type Size Range boolean 1 bit true, false char 16 bits Unicode characters byte 8 bits
More informationObject-Oriented Programming Design. Topic : Streams and Files
Electrical and Computer Engineering Object-Oriented Topic : Streams and Files Maj Joel Young Joel Young@afit.edu. 18-Sep-03 Maj Joel Young Java Input/Output Java implements input/output in terms of streams
More informationCombinational Circuits Digital Logic (Materials taken primarily from:
Combinational Circuits Digital Logic (Materials taken primarily from: http://www.facstaff.bucknell.edu/mastascu/elessonshtml/eeindex.html http://www.cs.princeton.edu/~cos126 ) Digital Systems What is a
More informationChettinad College of Engineering & Technology Department of Information Technology Internal Examination II (Answer Key)
Chettinad College of Engineering & Technology Department of Information Technology Internal Examination II (Answer Key) Branch & Section : B.Tech-IT / III Date: 06.09.2014 Semester : III Year V Sem Max.
More informationWelcome to CIS 068! 1. GUIs: JAVA Swing 2. (Streams and Files we ll not cover this in this semester, just a review) CIS 068
Welcome to! 1. GUIs: JAVA Swing 2. (Streams and Files we ll not cover this in this semester, just a review) Overview JAVA and GUIs: SWING Container, Components, Layouts Using SWING Streams and Files Text
More information09-1. CSE 143 Java GREAT IDEAS IN COMPUTER SCIENCE. Overview. Data Representation. Representation of Primitive Java Types. Input and Output.
CSE 143 Java Streams Reading: 19.1, Appendix A.2 GREAT IDEAS IN COMPUTER SCIENCE REPRESENTATION VS. RENDERING 4/28/2002 (c) University of Washington 09-1 4/28/2002 (c) University of Washington 09-2 Topics
More informationCode No: R Set No. 1
Code No: R059210504 Set No. 1 II B.Tech I Semester Supplementary Examinations, February 2007 DIGITAL LOGIC DESIGN ( Common to Computer Science & Engineering, Information Technology and Computer Science
More informationA graphical method of simplifying logic
4-5 Karnaugh Map Method A graphical method of simplifying logic equations or truth tables. Also called a K map. Theoretically can be used for any number of input variables, but practically limited to 5
More informationGate Level Minimization
Gate Level Minimization By Dr. M. Hebaishy Digital Logic Design Ch- Simplifying Boolean Equations Example : Y = AB + AB Example 2: = B (A + A) T8 = B () T5 = B T Y = A(AB + ABC) = A (AB ( + C ) ) T8 =
More informationLast Name Student Number. Last Name Student Number
University of Toronto Faculty of Applied Science and Engineering Department of Electrical and Computer Engineering Midterm Examination ECE 241F - Digital Systems Wednesday October 13, 2004, 6:00pm [5]
More informatione) Implicit and Explicit Type Conversion Pg 328 j) Types of errors Pg 371
Class IX HY 2013 Revision Guidelines Page 1 Section A (Power Point) Q1.What is PowerPoint? How are PowerPoint files named? Q2. Describe the 4 different ways of creating a presentation? (2 lines each) Q3.
More informationIT 201 Digital System Design Module II Notes
IT 201 Digital System Design Module II Notes BOOLEAN OPERATIONS AND EXPRESSIONS Variable, complement, and literal are terms used in Boolean algebra. A variable is a symbol used to represent a logical quantity.
More informationGate-Level Minimization. BME208 Logic Circuits Yalçın İŞLER
Gate-Level Minimization BME28 Logic Circuits Yalçın İŞLER islerya@yahoo.com http://me.islerya.com Complexity of Digital Circuits Directly related to the complexity of the algebraic expression we use to
More informationCOMP 213. Advanced Object-oriented Programming. Lecture 19. Input/Output
COMP 213 Advanced Object-oriented Programming Lecture 19 Input/Output Input and Output A program that read no input and produced no output would be a very uninteresting and useless thing. Forms of input/output
More informationCOMPUTER SCIENCE 2002 (Delhi Board)
COMPUTER SCIENCE 2002 (Delhi Board) Time allowed: 3 hours Max. Marks: 70 Instructions: (i) All the questions are compulsory. (ii) Programming Language: C++ QUESTION l. (a) What the purpose of a header
More informationPIC 20A Streams and I/O
PIC 20A Streams and I/O Ernest Ryu UCLA Mathematics Last edited: December 7, 2017 Why streams? Often, you want to do I/O without paying attention to where you are reading from or writing to. You can read
More informationAN IMPROTANT COLLECTION OF JAVA IO RELATED PROGRAMS
JAVALEARNINGS.COM AN IMPROTANT COLLECTION OF JAVA IO RELATED PROGRAMS Visit for more pdf downloads and interview related questions JAVALEARNINGS.COM /* Write a program to write n number of student records
More informationJava Input/Output. 11 April 2013 OSU CSE 1
Java Input/Output 11 April 2013 OSU CSE 1 Overview The Java I/O (Input/Output) package java.io contains a group of interfaces and classes similar to the OSU CSE components SimpleReader and SimpleWriter
More informationChapter 2 Combinational
Computer Engineering 1 (ECE290) Chapter 2 Combinational Logic Circuits Part 2 Circuit Optimization HOANG Trang 2008 Pearson Education, Inc. Overview Part 1 Gate Circuits and Boolean Equations Binary Logic
More information1.00 Lecture 30. Sending information to a Java program
1.00 Lecture 30 Input/Output Introduction to Streams Reading for next time: Big Java 15.5-15.7 Sending information to a Java program So far: use a GUI limited to specific interaction with user sometimes
More informationwww.vidyarthiplus.com Question Paper Code : 31298 B.E./B.Tech. DEGREE EXAMINATION, NOVEMBER/DECEMBER 2013. Third Semester Computer Science and Engineering CS 2202/CS 34/EC 1206 A/10144 CS 303/080230012--DIGITAL
More informationCode No: R Set No. 1
Code No: R059210504 Set No. 1 II B.Tech I Semester Regular Examinations, November 2007 DIGITAL LOGIC DESIGN ( Common to Computer Science & Engineering, Information Technology and Computer Science & Systems
More informationENEL 353: Digital Circuits Midterm Examination
NAME: SECTION: L01: Norm Bartley, ST 143 L02: Steve Norman, ST 145 When you start the test, please repeat your name and section, and add your U of C ID number at the bottom of the last page. Instructions:
More informationInput, Output and Exceptions. COMS W1007 Introduction to Computer Science. Christopher Conway 24 June 2003
Input, Output and Exceptions COMS W1007 Introduction to Computer Science Christopher Conway 24 June 2003 Input vs. Output We define input and output from the perspective of the programmer. Input is data
More informationChapter 2. Boolean Expressions:
Chapter 2 Boolean Expressions: A Boolean expression or a function is an expression which consists of binary variables joined by the Boolean connectives AND and OR along with NOT operation. Any Boolean
More informationI/O in Java I/O streams vs. Reader/Writer. HW#3 due today Reading Assignment: Java tutorial on Basic I/O
I/O 10-7-2013 I/O in Java I/O streams vs. Reader/Writer HW#3 due today Reading Assignment: Java tutorial on Basic I/O public class Swimmer implements Cloneable { public Date geteventdate() { return (Date)
More informationObjec&ves. Review. Standard Error Streams
Objec&ves Standard Error Streams Ø Byte Streams Ø Text Streams Oct 5, 2016 Sprenkle - CSCI209 1 Review What are benefits of excep&ons What principle of Java do files break if we re not careful? What class
More informationCode No: R Set No. 1
Code No: R059210504 Set No. 1 II B.Tech I Semester Regular Examinations, November 2006 DIGITAL LOGIC DESIGN ( Common to Computer Science & Engineering, Information Technology and Computer Science & Systems
More informationENGINEERS ACADEMY. 7. Given Boolean theorem. (a) A B A C B C A B A C. (b) AB AC BC AB BC. (c) AB AC BC A B A C B C.
Digital Electronics Boolean Function QUESTION BANK. The Boolean equation Y = C + C + C can be simplified to (a) (c) A (B + C) (b) AC (d) C. The Boolean equation Y = (A + B) (A + B) can be simplified to
More informationELCT201: DIGITAL LOGIC DESIGN
ELCT201: DIGITAL LOGIC DESIGN Dr. Eng. Haitham Omran, haitham.omran@guc.edu.eg Dr. Eng. Wassim Alexan, wassim.joseph@guc.edu.eg Lecture 3 Following the slides of Dr. Ahmed H. Madian محرم 1439 ه Winter
More informationBoolean Analysis of Logic Circuits
Course: B.Sc. Applied Physical Science (Computer Science) Year & Sem.: IInd Year, Sem - IIIrd Subject: Computer Science Paper No.: IX Paper Title: Computer System Architecture Lecture No.: 7 Lecture Title:
More informationCOMPUTER APPLICATION
Total No. of Printed Pages 16 HS/XII/A.Sc.Com/CAP/14 2 0 1 4 COMPUTER APPLICATION ( Science / Arts / Commerce ) ( Theory ) Full Marks : 70 Time : 3 hours The figures in the margin indicate full marks for
More information2008 The McGraw-Hill Companies, Inc. All rights reserved.
28 The McGraw-Hill Companies, Inc. All rights reserved. 28 The McGraw-Hill Companies, Inc. All rights reserved. All or Nothing Gate Boolean Expression: A B = Y Truth Table (ee next slide) or AB = Y 28
More informationHere is a hierarchy of classes to deal with Input and Output streams.
PART 25 25. Files and I/O 25.1 Reading and Writing Files A stream can be defined as a sequence of data. The InputStream is used to read data from a source and the OutputStream is used for writing data
More informationCS470: Computer Architecture. AMD Quad Core
CS470: Computer Architecture Yashwant K. Malaiya, Professor malaiya@cs.colostate.edu AMD Quad Core 1 Architecture Layers Building blocks Gates, flip-flops Functional bocks: Combinational, Sequential Instruction
More informationStandard Forms of Expression. Minterms and Maxterms
Standard Forms of Expression Minterms and Maxterms Standard forms of expressions We can write expressions in many ways, but some ways are more useful than others A sum of products (SOP) expression contains:
More informationHST 952. Computing for Biomedical Scientists Lecture 8
Harvard-MIT Division of Health Sciences and Technology HST.952: Computing for Biomedical Scientists HST 952 Computing for Biomedical Scientists Lecture 8 Outline Vectors Streams, Input, and Output in Java
More informationFIFO PAGE REPLACEMENT : import java.io.*; public class FIFO {
FIFO PAGE REPLACEMENT : import java.io.*; public class FIFO public static void main(string[] args) throws IOException BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int frames,
More informationCode No: 07A3EC03 Set No. 1
Code No: 07A3EC03 Set No. 1 II B.Tech I Semester Regular Examinations, November 2008 SWITCHING THEORY AND LOGIC DESIGN ( Common to Electrical & Electronic Engineering, Electronics & Instrumentation Engineering,
More informationB.Tech II Year I Semester (R13) Regular Examinations December 2014 DIGITAL LOGIC DESIGN
B.Tech II Year I Semester () Regular Examinations December 2014 (Common to IT and CSE) (a) If 1010 2 + 10 2 = X 10, then X is ----- Write the first 9 decimal digits in base 3. (c) What is meant by don
More information