Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • GfG 160: Daily DSA
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Aptitude
  • Engineering Mathematics
  • Discrete Mathematics
  • Operating System
  • DBMS
  • Computer Networks
  • Digital Logic and Design
  • C Programming
  • Data Structures
  • Algorithms
  • Theory of Computation
  • Compiler Design
  • Computer Org and Architecture
Open In App
Next Article:
Circuit (Combinational and Sequential) Implementation using Prolog
Next article icon

Circuit (Combinational and Sequential) Implementation using Prolog

Last Updated : 31 May, 2021
Comments
Improve
Suggest changes
Like Article
Like
Report
Prerequisite - Prolog | An Introduction

Overview :
Digital circuits or digital electronics is a branch of electronics which deals with digital signals to perform the various task to meet various requirement. The input signal applied to these circuits is of digital form, which is represented in 0’s and 1’s binary language format. These circuits are designed by using logical gates like AND, OR, NOT, NANAD, NOR, XOR gates which perform logical operations. This representation helps the circuit to switch from one state to another for providing precise output. Digital circuit systems are mainly designed to overcome the disadvantage of analog systems which are slower and the output data which is obtained may contain an error. There are two types of digital circuits Combinational Circuit and Sequential Circuit.

Implementation using Prolog :
Prolog is a logical and declarative programming language. The name itself, Prolog, is short for Programming in Logic.

Example :
Here the question arises, how do we depict a circuit in a prolog code. Consider the following circuit diagram.

There are 3 inputs in the circuit diagram, A, B, and C. We will consider and pass the above circuit diagram as a prolog code in the following line of code as follows.

circuit1(A,B,C,Q,R):-
    not(A,T1),
    and(A,B,T2),
    nand(T1,T2,T3),
    xnor(T3,C,T4),
    dff(T4,Q,R).

Description :
Here Q and R are the output variables. T1- T4 are the instance values or outputs of the in-between gates. The logic gates which has been used are:- NOT, AND, NAND, and XNOR gate. There is one D-FLIP FLOP and 2 outputs Q and Q'. We will consider the truth tables as facts and the circuit diagram as rules in prolog, As written in the following code.

Note -
In the following code, the truth tables are written for g-prolog. In swi-prolog, the truth tables are predefined.

Code implementation :
Here, we will implement the logic and will write the code in prolog.

Step-1 : 
Here, we will implement the truth tables of all logic gates for 2 inputs A and B. 

% Made by - Maninder kaur 
% Following are the truth tables of all logic gates for 2 inputs A and B.

and(0,0,0).
and(0,1,0).
and(1,0,0).
and(1,1,1).

or(0,0,0).
or(0,1,1).
or(1,0,1).
or(1,1,1).

not(0,1).
not(1,0).

nand(0,0,1).
nand(0,1,1).
nand(1,0,1).
nand(1,1,0).

nor(0,0,1).
nor(0,1,0).
nor(1,0,0).
nor(1,1,0).

xor(0,0,0).
xor(0,1,1).
xor(1,0,1).
xor(1,1,0).

xnor(0,0,1).
xnor(0,1,0).
xnor(1,0,0).
xnor(1,1,1).

Step-2 :
Here, we will implement the truth tables of OR GATE for 4 inputs A, B, C and D.

% Following is the truth tables of OR GATE for 4 inputs A ,B ,C and D.
% (Used in 8X3 Encoder)

or4(0,0,0,0,0).
or4(0,0,0,1,1).
or4(0,0,1,0,1).
or4(0,0,1,1,1).
or4(0,1,0,0,1).
or4(0,1,0,1,1).
or4(0,1,1,0,1).
or4(0,1,1,1,1).
or4(1,0,0,0,1).
or4(1,0,0,1,1).
or4(1,0,1,0,1).
or4(1,0,1,1,1).
or4(1,1,0,0,1).
or4(1,1,0,1,1).
or4(1,1,1,0,1).
or4(1,1,1,1,1).

Step-3 :
Here, we will implement the Half adder.

% HALF ADDER :-
% INPUT VARIABLES - A,B,C
% OUTPUT VARIABLES - S ,Ca(Sum and Carry)

half_adder(A,B,S,Ca):-
    xor(A,B,S),
    and(A,B,Ca).

Step-4 :
Here, we will implement the Full adder.

%FULL ADDER :-
%INPUT VARIABLES - A,B,C
%OUTPUT VARIABLES - S ,Ca (Sum and Carry)

full_adder(A,B,C,S,Ca):-
     xor(A,B,T1),
    xor(C,T1,S),
    and(T1,C,T2),
    and(A,B,T3),
    or(T3,T2,Ca).

Step-5 :
Here, we will implement the Half Subtractor.

%    HALF SUBTRACTOR :-
%    INPUT VARIABLES - A,B
%    OUTPUT VARIABLES - D ,BO (Difference and borrow)

half_sub(A,B,D,BO):-
    xor(A,B,D),
    not(A,T1),
    and(B,T1,BO).

Step-6 :
Here, we will implement the full subtractor.

% FULL SUBTRACTOR :-
% INPUT VARIABLES - A,B
% OUTPUT VARIABLES - D ,BO (Difference and borrow)

full_sub(A,B,BI,D,BO) :-
    xor(A,B,T1),
    xor(T1,BI,D),
    not(T1,T2),
    not(A,T3),
    nand(T2,BI,T4),
    nand(T3,B,T5),
    nand(T4,T5,BO).

Step-7 :
Now, we will implement the 2 × 4 DECODER.

% 2 X 4 DECODER
% INPUT VARIABLES - A,B
% OUTPUT VARIABLES - D0,D1,D2,D3

decoder_2x4(A,B,D0,D1,D2,D3):-
    not(A,A_0),
    not(B,B_0),
    and(A_0,B_0,D0),
    and(A_0,B,D1),
    and(A,B_0,D2),
    and(A,B,D3).

Step-8 :
Now, we will implement the 3 × 8 DECODER.

% 3 X 8 ENCODER
% OUTPUT VARIABLES - A,B
% INPUT VARIABLES - D0,D1,D2,D3,D4,D5,D6,D7

encoder_8x3(_,D1,D2,D3,D4,D5,D6,D7,A,B,C):-
    or4(D1,D3,D5,D7,A),
    or4(D2,D3,D6,D7,B),
    or4(D4,D5,D6,D7,C).

Step-9 :
Now, we will implement the 2 X 1 MULTIPLEXER.

% 2 X 1 MULTIPLEXER
% INPUT VARIABLES - A,B,S (Selector)
% OUTPUT VARIABLES - Z

mux_2x1(A,B,S,Z):-
    not(S,S1),
    and(A,S1,I0),
    and(B,S,I1),
    or(I0,I1,Z).

Step-10 :
Now, we will implement the 1 × 2 DEMULTIPLEXER.

% 1 X 2 DEMULTIPLEXER
% INPUT VARIABLES - I (Input) ,S (Selector)
% OUTPUT VARIABLES - A,B

demux_1x2(I,S,A,B):-
    not(S,S_0),
    and(I,S_0,A),
    and(I,S,B).

Step-11 :
Now, we will implement the 1 × 4 DEMULTIPLEXER.

% 1 X 4 DEMULTIPLEXER
% INPUT VARIABLES - I (Input) ,S0 and S1(Selectors)
% OUTPUT VARIABLES - A,B,C,D

demux_1x4(I,S0,S1,A,B,C,D):-
    decoder_2x4(S0,S1,T0,T1,T2,T3),
    and(I,T0,A),
    and(I,T1,B),
    and(I,T2,C),
    and(I,T3,D).

Step-12 :
Now, we will implement the D FLIP FLOP.

% D FLIP FLOP TRUTH TABLE

dff(0,0,1).
dff(1,1,0).

Step-13 :
Now, we will implement the circuit code.

% CIRCUITS

circuit1(A,B,C,Q,R):-
    not(A,T1),
    and(A,B,T2),
    nand(T1,T2,T3),
    xnor(T3,C,T4),
    dff(T4,Q,R).

Output :

  


Next Article
Circuit (Combinational and Sequential) Implementation using Prolog

M

manikathuria2001
Improve
Article Tags :
  • Digital Logic

Similar Reads

    Combinational and Sequential Circuits
    Digital logic circuits are fundamental components in modern electronic devices, enabling operations in systems like computers, mobile phones and calculators by processing binary data through logic gates such as AND, OR and NOT. These circuits are essential for tasks like data storage, decision-makin
    3 min read
    Difference between Combinational and Sequential Circuit
    In digital electronics, circuits are classified into two primary categories: The combinational circuits and the sequential circuits. Where the outputs depend on the current inputs are called combination circuit, combinational circuits are simple and effective for functions like addition, subtraction
    4 min read
    Analysis and Design of Combinational and Sequential circuits
    Logic circuits can be combinational or sequential. A combinational circuit consists of logic gates whose outputs at any time are determined from only the present combination of inputs. The operation of combinational circuits can be specified logically by a set of Boolean functions. Sequential circui
    3 min read
    Classifications of Combinational and Sequential circuits
    1. Classifications of Combinational Circuits: There are three main categories of combinational circuits: arithmetic or logical functions, data transmission and code converter as given below in category diagram. Functions of Combinational circuits are generally expressed by Boolean algebra, Truth tab
    2 min read
    Implementing Any Circuit Using NAND Gate Only
    A universal gate is such a gate that we can implement any Boolean function, no matter how complex, using a circuit that consists of only that particular universal gate. The NAND & NOR gates are the most commonly encountered universal gates in digital logic.In this article, we will take a look at
    8 min read
    Combinational circuits using Decoder
    Combinational circuits utilizing decoders are basic parts in a computerized plan, assuming a significant part in making an interpretation of parallel data into noteworthy results. Decoders are combinational rationale gadgets that convert twofold information signals into an extraordinary arrangement
    8 min read
    Difference between Characteristics of Combinational and Sequential circuits
    Combinational and sequential are important building blocks used in the many electronic devices. The main difference between them is how they work with the time. Combinational circuits dont care about the time they just react to what is happening right now. Sequential circuits on remember what happen
    6 min read
    Construction of Combinational Circuits
    Combinational circuits are digital circuits. In these circuits output is determined by the current input values. The current output is not dependent on any memory or feedback from previous results. There are various functions performed by Combinational Circuits. Example include logic operations, ari
    5 min read
    Synchronous Sequential Circuits in Digital Logic
    Synchronous sequential circuits are digital circuits that use clock signals to determine the timing of their operations. They are commonly used in digital systems to implement timers, counters, and memory elements.What is Sequential Circuit?A sequential circuit is a digital circuit, whose output dep
    5 min read
    Introduction of Sequential Circuits
    Sequential circuits are digital circuits that store and use the previous state information to determine their next state. Unlike combinational circuits, which only depend on the current input values to produce outputs, sequential circuits depend on both the current inputs and the previous state stor
    7 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

'); // $('.spinner-loading-overlay').show(); let script = document.createElement('script'); script.src = 'https://assets.geeksforgeeks.org/v2/editor-prod/static/js/bundle.min.js'; script.defer = true document.head.appendChild(script); script.onload = function() { suggestionModalEditor() //to add editor in suggestion modal if(loginData && loginData.premiumConsent){ personalNoteEditor() //to load editor in personal note } } script.onerror = function() { if($('.editorError').length){ $('.editorError').remove(); } var messageDiv = $('
').text('Editor not loaded due to some issues'); $('#suggestion-section-textarea').append(messageDiv); $('.suggest-bottom-btn').hide(); $('.suggestion-section').hide(); editorLoaded = false; } }); //suggestion modal editor function suggestionModalEditor(){ // editor params const params = { data: undefined, plugins: ["BOLD", "ITALIC", "UNDERLINE", "PREBLOCK"], } // loading editor try { suggestEditorInstance = new GFGEditorWrapper("suggestion-section-textarea", params, { appNode: true }) suggestEditorInstance._createEditor("") $('.spinner-loading-overlay:eq(0)').remove(); editorLoaded = true; } catch (error) { $('.spinner-loading-overlay:eq(0)').remove(); editorLoaded = false; } } //personal note editor function personalNoteEditor(){ // editor params const params = { data: undefined, plugins: ["UNDO", "REDO", "BOLD", "ITALIC", "NUMBERED_LIST", "BULLET_LIST", "TEXTALIGNMENTDROPDOWN"], placeholderText: "Description to be......", } // loading editor try { let notesEditorInstance = new GFGEditorWrapper("pn-editor", params, { appNode: true }) notesEditorInstance._createEditor(loginData&&loginData.user_personal_note?loginData.user_personal_note:"") $('.spinner-loading-overlay:eq(0)').remove(); editorLoaded = true; } catch (error) { $('.spinner-loading-overlay:eq(0)').remove(); editorLoaded = false; } } var lockedCasesHtml = `You can suggest the changes for now and it will be under 'My Suggestions' Tab on Write.

You will be notified via email once the article is available for improvement. Thank you for your valuable feedback!`; var badgesRequiredHtml = `It seems that you do not meet the eligibility criteria to create improvements for this article, as only users who have earned specific badges are permitted to do so.

However, you can still create improvements through the Pick for Improvement section.`; jQuery('.improve-header-sec-child').on('click', function(){ jQuery('.improve-modal--overlay').hide(); $('.improve-modal--suggestion').hide(); jQuery('#suggestion-modal-alert').hide(); }); $('.suggest-change_wrapper, .locked-status--impove-modal .improve-bottom-btn').on('click',function(){ // when suggest changes option is clicked $('.ContentEditable__root').text(""); $('.suggest-bottom-btn').html("Suggest changes"); $('.thank-you-message').css("display","none"); $('.improve-modal--improvement').hide(); $('.improve-modal--suggestion').show(); $('#suggestion-section-textarea').show(); jQuery('#suggestion-modal-alert').hide(); if(suggestEditorInstance !== null){ suggestEditorInstance.setEditorValue(""); } $('.suggestion-section').css('display', 'block'); jQuery('.suggest-bottom-btn').css("display","block"); }); $('.create-improvement_wrapper').on('click',function(){ // when create improvement option clicked then improvement reason will be shown if(loginData && loginData.isLoggedIn) { $('body').append('
'); $('.spinner-loading-overlay').show(); jQuery.ajax({ url: writeApiUrl + 'create-improvement-post/?v=1', type: "POST", contentType: 'application/json; charset=utf-8', dataType: 'json', xhrFields: { withCredentials: true }, data: JSON.stringify({ gfg_id: post_id }), success:function(result) { $('.spinner-loading-overlay:eq(0)').remove(); $('.improve-modal--overlay').hide(); $('.unlocked-status--improve-modal-content').css("display","none"); $('.create-improvement-redirection-to-write').attr('href',writeUrl + 'improve-post/' + `${result.id}` + '/', '_blank'); $('.create-improvement-redirection-to-write')[0].click(); }, error:function(e) { showErrorMessage(e.responseJSON,e.status) }, }); } else { if(loginData && !loginData.isLoggedIn) { $('.improve-modal--overlay').hide(); if ($('.header-main__wrapper').find('.header-main__signup.login-modal-btn').length) { $('.header-main__wrapper').find('.header-main__signup.login-modal-btn').click(); } return; } } }); $('.left-arrow-icon_wrapper').on('click',function(){ if($('.improve-modal--suggestion').is(":visible")) $('.improve-modal--suggestion').hide(); else{ } $('.improve-modal--improvement').show(); }); const showErrorMessage = (result,statusCode) => { if(!result) return; $('.spinner-loading-overlay:eq(0)').remove(); if(statusCode == 403) { $('.improve-modal--improve-content.error-message').html(result.message); jQuery('.improve-modal--overlay').show(); jQuery('.improve-modal--improvement').show(); $('.locked-status--impove-modal').css("display","block"); $('.unlocked-status--improve-modal-content').css("display","none"); $('.improve-modal--improvement').attr("status","locked"); return; } } function suggestionCall() { var editorValue = suggestEditorInstance.getValue(); var suggest_val = $(".ContentEditable__root").find("[data-lexical-text='true']").map(function() { return $(this).text().trim(); }).get().join(' '); suggest_val = suggest_val.replace(/\s+/g, ' ').trim(); var array_String= suggest_val.split(" ") //array of words var gCaptchaToken = $("#g-recaptcha-response-suggestion-form").val(); var error_msg = false; if(suggest_val != "" && array_String.length >=4){ if(editorValue.length <= 2000){ var payload = { "gfg_post_id" : `${post_id}`, "suggestion" : `${editorValue}`, } if(!loginData || !loginData.isLoggedIn) // User is not logged in payload["g-recaptcha-token"] = gCaptchaToken jQuery.ajax({ type:'post', url: "https://apiwrite.geeksforgeeks.org/suggestions/auth/create/", xhrFields: { withCredentials: true }, crossDomain: true, contentType:'application/json', data: JSON.stringify(payload), success:function(data) { if(!loginData || !loginData.isLoggedIn) { grecaptcha.reset(); } jQuery('.spinner-loading-overlay:eq(0)').remove(); jQuery('.suggest-bottom-btn').css("display","none"); $('#suggestion-section-textarea').hide() $('.thank-you-message').css('display', 'flex'); $('.suggestion-section').css('display', 'none'); jQuery('#suggestion-modal-alert').hide(); }, error:function(data) { if(!loginData || !loginData.isLoggedIn) { grecaptcha.reset(); } jQuery('.spinner-loading-overlay:eq(0)').remove(); jQuery('#suggestion-modal-alert').html("Something went wrong."); jQuery('#suggestion-modal-alert').show(); error_msg = true; } }); } else{ jQuery('.spinner-loading-overlay:eq(0)').remove(); jQuery('#suggestion-modal-alert').html("Minimum 4 Words and Maximum Words limit is 1000."); jQuery('#suggestion-modal-alert').show(); jQuery('.ContentEditable__root').focus(); error_msg = true; } } else{ jQuery('.spinner-loading-overlay:eq(0)').remove(); jQuery('#suggestion-modal-alert').html("Enter atleast four words !"); jQuery('#suggestion-modal-alert').show(); jQuery('.ContentEditable__root').focus(); error_msg = true; } if(error_msg){ setTimeout(() => { jQuery('.ContentEditable__root').focus(); jQuery('#suggestion-modal-alert').hide(); }, 3000); } } document.querySelector('.suggest-bottom-btn').addEventListener('click', function(){ jQuery('body').append('
'); jQuery('.spinner-loading-overlay').show(); if(loginData && loginData.isLoggedIn) { suggestionCall(); return; } // script for grecaptcha loaded in loginmodal.html and call function to set the token setGoogleRecaptcha(); }); $('.improvement-bottom-btn.create-improvement-btn').click(function() { //create improvement button is clicked $('body').append('
'); $('.spinner-loading-overlay').show(); // send this option via create-improvement-post api jQuery.ajax({ url: writeApiUrl + 'create-improvement-post/?v=1', type: "POST", contentType: 'application/json; charset=utf-8', dataType: 'json', xhrFields: { withCredentials: true }, data: JSON.stringify({ gfg_id: post_id }), success:function(result) { $('.spinner-loading-overlay:eq(0)').remove(); $('.improve-modal--overlay').hide(); $('.create-improvement-redirection-to-write').attr('href',writeUrl + 'improve-post/' + `${result.id}` + '/', '_blank'); $('.create-improvement-redirection-to-write')[0].click(); }, error:function(e) { showErrorMessage(e.responseJSON,e.status); }, }); });
"For an ad-free experience and exclusive features, subscribe to our Premium Plan!"
Continue without supporting
`; $('body').append(adBlockerModal); $('body').addClass('body-for-ad-blocker'); const modal = document.getElementById("adBlockerModal"); modal.style.display = "block"; } function handleAdBlockerClick(type){ if(type == 'disabled'){ window.location.reload(); } else if(type == 'info'){ document.getElementById("ad-blocker-div").style.display = "none"; document.getElementById("ad-blocker-info-div").style.display = "flex"; handleAdBlockerIconClick(0); } } var lastSelected= null; //Mapping of name and video URL with the index. const adBlockerVideoMap = [ ['Ad Block Plus','https://media.geeksforgeeks.org/auth-dashboard-uploads/abp-blocker-min.mp4'], ['Ad Block','https://media.geeksforgeeks.org/auth-dashboard-uploads/Ad-block-min.mp4'], ['uBlock Origin','https://media.geeksforgeeks.org/auth-dashboard-uploads/ub-blocke-min.mp4'], ['uBlock','https://media.geeksforgeeks.org/auth-dashboard-uploads/U-blocker-min.mp4'], ] function handleAdBlockerIconClick(currSelected){ const videocontainer = document.getElementById('ad-blocker-info-div-gif'); const videosource = document.getElementById('ad-blocker-info-div-gif-src'); if(lastSelected != null){ document.getElementById("ad-blocker-info-div-icons-"+lastSelected).style.backgroundColor = "white"; document.getElementById("ad-blocker-info-div-icons-"+lastSelected).style.borderColor = "#D6D6D6"; } document.getElementById("ad-blocker-info-div-icons-"+currSelected).style.backgroundColor = "#D9D9D9"; document.getElementById("ad-blocker-info-div-icons-"+currSelected).style.borderColor = "#848484"; document.getElementById('ad-blocker-info-div-name-span').innerHTML = adBlockerVideoMap[currSelected][0] videocontainer.pause(); videosource.setAttribute('src', adBlockerVideoMap[currSelected][1]); videocontainer.load(); videocontainer.play(); lastSelected = currSelected; }

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences